aboutsummaryrefslogtreecommitdiff
path: root/views/default/navigation/site_nav.php
blob: 965eb7e633015e6160265702a5e71c7f3862b322 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
/**
 * Main site-wide navigation
 **/

$featured = $vars['config']->menu_items['featured_urls'];
$current_context = get_context();

echo '<div id="elgg_main_nav" class="clearfloat">
	<ul class="navigation">';

foreach ($featured as $info) {
	$selected = ($info->value->context == $current_context) ? 'class="selected"' : '';
	$title = htmlentities($info->name, ENT_QUOTES, 'UTF-8');
	$url = htmlentities($info->value->url, ENT_QUOTES, 'UTF-8');

	echo "<li $selected><a href=\"$url\" title=\"$title\"><span>$title</span></a></li>";
}

echo '
	</ul>
</div>';