diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-17 19:09:09 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-17 19:09:09 +0000 |
commit | ff6f2152bb6f0a759bffbcc213a82aecc0237ae6 (patch) | |
tree | a0ed026661677ab315069274ca05f7395e6248c5 /views/default/navigation/site_nav.php | |
parent | 99d5f4b0d22e99109da860dd9118265c883a668e (diff) | |
download | elgg-ff6f2152bb6f0a759bffbcc213a82aecc0237ae6.tar.gz elgg-ff6f2152bb6f0a759bffbcc213a82aecc0237ae6.tar.bz2 |
Added config options for tabs and menu items.
git-svn-id: http://code.elgg.org/elgg/trunk@5431 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/navigation/site_nav.php')
-rw-r--r-- | views/default/navigation/site_nav.php | 76 |
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 |