Friday 26 June 2015

node.tpl.php

<div class="container main-container">
  <div class="row">
 
  <?php
/**
 * Provides child menu & active parent of active parent...
 */



$path = 'node/'.$node->nid.'';
$parent = menu_link_get_preferred($path);
$parameters = array(

    'active_trail' => array($parent['plid']),
    'only_active_trail' => FALSE,
    'min_depth' => $parent['depth']+1,
    'max_depth' => $parent['depth']+1,
    'conditions' => array('plid' => $parent['mlid']),
  );

$children = menu_build_tree($parent['menu_name'], $parameters);

 foreach($children as $child)
{

if($child['link']['depth'] == 3)

{


?>
<div class="services">
<?php print render($page['rates']); ?>
  </div>


    <div class="col-lg-6 col-md-5 col-sm-24 col-xs-24 caluclators-tools">
      <h3>Caluclators and Tools</h3>
    </div>
   
 
   
    <div class="col-lg-18 col-md-24 col-sm-24 col-xs-24">






<ul class="nav nav-tabs tabs-custom" role="tablist" id="myTab">

<!-- Featured Services Tabs start -->

<?php foreach($children as $child)
{

$title1 = $child['link']['link_title'];
$title = str_replace('?','',$child['link']['link_title']);
$path = $child['link']['href'];
$nid = str_replace('node/','',$child['link']['link_path']);
$test = node_load($nid);


 ?>

<li role="presentation">
<a class="<?php echo strtolower(str_replace(' ','_',$title)); ?>" href="#<?php echo strtolower(str_replace(' ','_',$title)); ?>" aria-controls="<?php echo strtolower(str_replace(' ','_',$title)); ?>" role="tab" data-toggle="tab"><?php echo $title; ?></a>
</li>
<?php
}
?>
</ul>
      <div class="tab-content">
     
<?php foreach($children as $child)
{

$title1 = $child['link']['link_title'];
$title = str_replace('?','',$child['link']['link_title']);
$path = $child['link']['href'];
$nid = str_replace('node/','',$child['link']['link_path']);
$test = node_load($nid);


 ?>
 
<div role="tabpanel" class="tab-pane" id="<?php echo strtolower(str_replace(' ','_',$title)); ?>">
<?php
echo $test->body['und']['0']['value'];
?>
</div>
<?php   } ?>
      </div>


      <!--<h2 class="featured-service-title">Featured Service</h2>-->
 
   
    </div>
  </div>
</div>
<div class="container main-container">
  <div class="row">
    <div class="col-lg-8 col-md-8 col-sm-24 col-xs-24">
      <div class="emv-card">
        <h1>EMV Credit Cards</h1>
        <p>Take a minute to tell us what we are doing well or what we are doing not so well Take a minute to tell us what we are doing </p>
        <div class="view-all"><a href="#"><img src="<?php echo $directory; ?>/images/learn-more.png" alt="Learn More" title="Learn More" /></a></div>
      </div>
    </div>
    <div class="col-lg-8 col-md-8 col-sm-24 col-xs-24">
      <div class="emv-card">
        <h1>Low Mortgages Rates</h1>
        <p>Take a minute to tell us what we are doing well or what we are doing not so well Take a minute to tell us what we are doing </p>
        <div class="view-all"><a href="#"><img src="<?php echo $directory; ?>/images/learn-more.png" alt="Learn More" title="Learn More" /></a></div>
      </div>
    </div>
    <div class="col-lg-8 col-md-8 col-sm-24 col-xs-24">
      <div class="emv-card">
        <h1>Auto and Boat Loans</h1>
        <p>Take a minute to tell us what we are doing well or what we are doing not so well Take a minute to tell us what we are doing </p>
        <div class="view-all"><a href="#"><img src="<?php echo $directory; ?>/images/learn-more.png" alt="Learn More" title="Learn More" /></a></div>
      </div>
    </div>
  </div>
</div>

<?php break;  }
if($child['link']['depth'] == 4)

{

?>
<div class="col-lg-2 col-md-2 col-sm-0 col-xs-0"> </div>
  <div class="col-lg-20 col-md-20 col-sm-24 col-xs-24 tabs-custom-two">
     <ul class="nav nav-tabs tabs-custom" role="tablist" id="myTab">

<!-- Featured Services Tabs start -->

<?php foreach($children as $child)
{

$title1 = $child['link']['link_title'];
$title = str_replace('?','',$child['link']['link_title']);
$path = $child['link']['href'];
$nid = str_replace('node/','',$child['link']['link_path']);
$test = node_load($nid);


 ?>

<li role="presentation">
<a class="<?php echo strtolower(str_replace(' ','_',$title)); ?>" href="#<?php echo strtolower(str_replace(' ','_',$title)); ?>" aria-controls="<?php echo strtolower(str_replace(' ','_',$title)); ?>" role="tab" data-toggle="tab"><?php echo $title; ?></a>
</li>
<?php
}
?>
</ul>
      <div class="tab-content">
     
<?php foreach($children as $child)
{

$title1 = $child['link']['link_title'];
$title = str_replace('?','',$child['link']['link_title']);
$path = $child['link']['href'];
$nid = str_replace('node/','',$child['link']['link_path']);
$test = node_load($nid);


 ?>
 
<div role="tabpanel" class="tab-pane" id="<?php echo strtolower(str_replace(' ','_',$title)); ?>">
<?php
echo $test->body['und']['0']['value'];
?>
</div>
<?php   } ?>
      </div>
   
   
    </div>
  <div class="col-lg-2 col-md-2 col-sm-0 col-xs-0"> </div>
  </div>
<?php break;



}
 ?>
<?php
}
?>


<?php
foreach($node->menu_node_links as $nodes)
{
if($nodes->has_children == '0' )
{ ?>
<div class="container main-container">
  <div class="row">
    <div class="col-lg-18 col-md-24 col-sm-24 col-xs-24">




<h2 class="featured-service-title"><?php echo $node->title; ?> </h2>
<?php echo $node->body['und'][0]['value'];

 
     ?>
    </div>
    <div class="col-lg-6 col-md-5 col-sm-24 col-xs-24 caluclators-tools no-top-margin alpha">
      <!--<h3>Caluclators and Tools</h3>-->
      <h2 class="featured-service-title">Caluclators</h2>
      <div class="caluclators-tools-content"></div>
    </div>
  </div>
</div>
<?php
break;
}
}
?>
<?php
/*
foreach($node->menu_node_links as $nodes)
{
if($nodes->menu_name == 'menu-sdfcu-menu' && $nodes->has_children == '0' )
{
echo $node->body['und'][0]['value'];
break;
}
}  */
?>

 <div class="services">
  <?php print render(block_get_blocks_by_region('rates'));  ?>
  </div>
 
  

No comments:

Post a Comment