SHARE
TWEET

Bootstrap Tabs in Concrete5

hursey013 Jul 10th, 2014 427 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!-- Nav tabs -->
  2. <ul class="nav nav-tabs" role="tablist">
  3. <?php
  4. $tabs = $c->getAttribute('tabs');      
  5. for( $i=0; $i<$tabs; $i++ ) {
  6.   if ($i == 0){
  7.     echo '<li class="active"><a href="#tab' . $i . '" role="tab" data-toggle="tab">' . $c->getAttribute('tabs_label' . $i). '</a></li>';
  8.   }else{
  9.     echo '<li><a href="#tab' . $i . '" role="tab" data-toggle="tab">' . $c->getAttribute('tabs_label' . $i). '</a></li>';
  10.   }
  11. }
  12. ?>
  13. </ul>
  14.  
  15. <!-- Tab panes -->
  16. <div class="tab-content">
  17. <?php
  18. for( $i=0; $i<$tabs; $i++ ) {
  19.   if ($i == 0){
  20.     echo '<div class="tab-pane active" id="tab' . $i . '">';
  21.   }else{
  22.     echo '<div class="tab-pane" id="tab' . $i . '">';
  23.   }
  24.   $a = new Area('Tab' . $i);
  25.   $a->display($c);
  26.   echo '</div>';
  27. }
  28. ?>     
  29. </div>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top