aboutsummaryrefslogtreecommitdiff
path: root/views/default/navigation/menu/elements/item.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/navigation/menu/elements/item.php')
-rw-r--r--views/default/navigation/menu/elements/item.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/views/default/navigation/menu/elements/item.php b/views/default/navigation/menu/elements/item.php
index f6959b2f4..7903dbdc0 100644
--- a/views/default/navigation/menu/elements/item.php
+++ b/views/default/navigation/menu/elements/item.php
@@ -7,4 +7,19 @@ if ($item->getSelected()) {
$class = 'class="selected"';
}
-echo "<li $class>{$item->getLink()}</li>";
+$link_vars = array();
+
+$children = $item->getChildren();
+if ($children) {
+ $link_vars['class'] = 'elgg-menu-parent elgg-menu-closed';
+}
+
+echo "<li $class>";
+echo $item->getLink($link_vars);
+if ($children) {
+ echo elgg_view('navigation/menu/elements/group', array(
+ 'items' => $children,
+ 'class' => 'elgg-menu elgg-child-menu',
+ ));
+}
+echo '</li>';