aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-19 07:59:33 -0500
committerCash Costello <cash.costello@gmail.com>2011-11-19 07:59:33 -0500
commit5f3935de2012b2bd88c0d6ba227570b54ce10bc6 (patch)
tree10509c8acbba59385c7b9c982750e4f520cacf5b
parent7cc4c3139d8d75335bd7e9b21d99257ff8d3cc72 (diff)
downloadelgg-5f3935de2012b2bd88c0d6ba227570b54ce10bc6.tar.gz
elgg-5f3935de2012b2bd88c0d6ba227570b54ce10bc6.tar.bz2
Fixes #4102 handling no menu items for site menu
-rw-r--r--views/default/navigation/menu/site.php9
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>';