aboutsummaryrefslogtreecommitdiff
path: root/views/default/navigation/site_nav.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/navigation/site_nav.php')
-rw-r--r--views/default/navigation/site_nav.php76
1 files changed, 15 insertions, 61 deletions
diff --git a/views/default/navigation/site_nav.php b/views/default/navigation/site_nav.php
index 8431188d8..965eb7e63 100644
--- a/views/default/navigation/site_nav.php
+++ b/views/default/navigation/site_nav.php
@@ -2,67 +2,21 @@
/**
* Main site-wide navigation
**/
-
-echo "<div id='elgg_main_nav' class='clearfloat'>";
-echo "<ul class='navigation'>";
-if(is_plugin_enabled('riverdashboard')){
- if(get_context() == 'riverdashboard')
- $selected = 'class="selected"';
- else
- $selected = "";
- echo "<li {$selected}><a href=\"{$vars['url']}mod/riverdashboard/\" title='Activity'><span>Activity</span></a></li>";
-}
-if(is_plugin_enabled('thewire') && isloggedin()){
- if(get_context() == 'thewire')
- $selected = 'class="selected"';
- else
- $selected = "";
- echo "<li {$selected}><a href=\"{$vars['url']}mod/thewire/everyone.php\" title='The Wire'><span>" . elgg_echo('thewire:title') . "</span></a></li>";
-}
-if(is_plugin_enabled('conversations') && isloggedin()){
- if(get_context() == 'conversations')
- $selected = 'class="selected"';
- else
- $selected = "";
- echo "<li {$selected}><a href=\"{$vars['url']}mod/conversations/all.php\" title='Conversations'><span>" . elgg_echo('conversations') . "</span></a></li>";
-}
-if(is_plugin_enabled('blog')){
- if(get_context() == 'blog')
- $selected = 'class="selected"';
- else
- $selected = "";
- echo "<li {$selected}><a href=\"{$vars['url']}mod/blog/all.php\" title='Blogs'><span>Blogs</span></a></li>";
-}
-if(is_plugin_enabled('pages')){
- if(get_context() == 'pages')
- $selected = 'class="selected"';
- else
- $selected = "";
- echo "<li {$selected}><a href=\"{$vars['url']}mod/pages/all.php\" title='Pages'><span>Pages</span></a></li>";
-}
-if(is_plugin_enabled('file')){
- if(get_context() == 'file')
- $selected = 'class="selected"';
- else
- $selected = "";
- echo "<li {$selected}><a href=\"{$vars['url']}pg/file/world/world/\" title='Files'><span>Files</span></a></li>";
-}
-if(is_plugin_enabled('bookmarks')){
- if(get_context() == 'bookmarks')
- $selected = 'class="selected"';
- else
- $selected = "";
- echo "<li {$selected}><a href=\"{$vars['url']}mod/bookmarks/all.php\" title='Bookmarks'><span>Bookmarks</span></a></li>";
-}
-if(is_plugin_enabled('groups')){
- if(get_context() == 'groups')
- $selected = 'class="selected"';
- else
- $selected = "";
- echo "<li {$selected}><a href=\"{$vars['url']}pg/groups/world/\" title='Groups'><span>". elgg_echo('groups') . "</span></a></li>";
+$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>";
-echo "</div>";
-?> \ No newline at end of file
+echo '
+ </ul>
+</div>'; \ No newline at end of file