diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-11-19 07:59:33 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-11-28 21:44:01 -0500 |
commit | 653637402f613b5d4bc9802f59ff2b13571a0388 (patch) | |
tree | fdac62712d804ae5f8f9622d2ba7edc4ca6bac7d | |
parent | 4f1c656f51bacaa5c9e3e0550cf0cfb3422f879f (diff) | |
download | elgg-653637402f613b5d4bc9802f59ff2b13571a0388.tar.gz elgg-653637402f613b5d4bc9802f59ff2b13571a0388.tar.bz2 |
Fixes #4102 handling no menu items for site menu
-rw-r--r-- | views/default/navigation/menu/site.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/views/default/navigation/menu/site.php b/views/default/navigation/menu/site.php index 38b42bda9..24c21dd57 100644 --- a/views/default/navigation/menu/site.php +++ b/views/default/navigation/menu/site.php @@ -6,12 +6,15 @@ * @uses $vars['menu']['more'] */ +$default_items = elgg_extract('default', $vars['menu'], array()); +$more_items = elgg_extract('more', $vars['menu'], array()); + echo '<ul class="elgg-menu elgg-menu-site elgg-menu-site-default clearfix">'; -foreach ($vars['menu']['default'] as $menu_item) { +foreach ($default_items as $menu_item) { echo elgg_view('navigation/menu/elements/item', array('item' => $menu_item)); } -if (isset($vars['menu']['more']) && !empty($vars['menu']['more'])) { +if ($more_items) { echo '<li class="elgg-more">'; $more = elgg_echo('more'); @@ -19,7 +22,7 @@ if (isset($vars['menu']['more']) && !empty($vars['menu']['more'])) { echo elgg_view('navigation/menu/elements/section', array( 'class' => 'elgg-menu elgg-menu-site elgg-menu-site-more', - 'items' => $vars['menu']['more'], + 'items' => $more_items, )); echo '</li>'; |