aboutsummaryrefslogtreecommitdiff
path: root/views/default/navigation/menu/elements/item.php
blob: 7903dbdc074216d94e4d2592af81f94c92ba6378 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php

$item = $vars['item'];

$class = '';
if ($item->getSelected()) {
	$class = 'class="selected"';
}

$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>';