diff options
Diffstat (limited to 'views/default/navigation')
-rw-r--r-- | views/default/navigation/menu/elements/item.php | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/views/default/navigation/menu/elements/item.php b/views/default/navigation/menu/elements/item.php index 5a9a8743d..7b07c9485 100644 --- a/views/default/navigation/menu/elements/item.php +++ b/views/default/navigation/menu/elements/item.php @@ -1,19 +1,28 @@ <?php +/** + * A single element of a menu. + * + * @package Elgg.Core + * @subpackage Navigation + */ $item = $vars['item']; -$class = ''; $link_class = 'elgg-menu-closed'; if ($item->getSelected()) { - $class = 'class="elgg-state-selected"'; + $item->setItemClass('elgg-state-selected'); $link_class = 'elgg-menu-opened'; } -$link_vars = array(); - $children = $item->getChildren(); if ($children) { - $link_vars['class'] = "elgg-menu-parent $link_class"; + $item->setLinkClass($link_class); + $item->setLinkClass('elgg-menu-parent'); +} + +$item_class = $item->getItemClass(); +if ($item_class) { + $class = "class=\"$item_class\""; } echo "<li $class>"; |