site.php 735 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Site navigation menu
  4. *
  5. * @uses $vars['menu']['default']
  6. * @uses $vars['menu']['more']
  7. */
  8. $default_items = elgg_extract('default', $vars['menu'], array());
  9. $more_items = elgg_extract('more', $vars['menu'], array());
  10. echo '<ul class="elgg-menu elgg-menu-site elgg-menu-site-default clearfix">';
  11. foreach ($default_items as $menu_item) {
  12. echo elgg_view('navigation/menu/elements/item', array('item' => $menu_item));
  13. }
  14. if ($more_items) {
  15. echo '<li class="elgg-more">';
  16. $more = elgg_echo('more');
  17. echo "<a href=\"#\">$more</a>";
  18. echo elgg_view('navigation/menu/elements/section', array(
  19. 'class' => 'elgg-menu elgg-menu-site elgg-menu-site-more',
  20. 'items' => $more_items,
  21. ));
  22. echo '</li>';
  23. }
  24. echo '</ul>';