navigation.phtml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <!--
  2. main navigation view partial
  3. should only be called by the navigation view helper
  4. -->
  5. <nav class="navbar navbar-default" role="navigation">
  6. <!-- Brand and toggle get grouped for better mobile display -->
  7. <div class="navbar-header">
  8. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#main-navigation-collapse">
  9. <span class="sr-only"><?php echo $this->_('Toggle navigation'); ?></span>
  10. <span class="icon-bar"></span>
  11. <span class="icon-bar"></span>
  12. <span class="icon-bar"></span>
  13. </button>
  14. </div>
  15. <!-- Collect the nav links, forms, and other content for toggling -->
  16. <div class="collapse navbar-collapse" id="main-navigation-collapse">
  17. <ul class="nav navbar-nav navbar-right">
  18. <?php foreach ($this->menu->pages as $page) { ?>
  19. <?php if ((!$page->settings || (intval($this->settings[(string)$page->settings['name']]) == $page->settings['value'])) ||
  20. ($this->navigation()->accept($page))
  21. ) {
  22. ?>
  23. <li <?php echo ($page->isActive(true)) ? 'class="active"' : ''; ?>>
  24. <a href="<?php echo $this->url($page->params); ?>">
  25. <?php echo $page->label; ?>
  26. </a>
  27. </li>
  28. <?php } ?>
  29. <?php } ?>
  30. </ul>
  31. </div>
  32. <!-- /.navbar-collapse -->
  33. </nav>