aboutsummaryrefslogtreecommitdiff
path: root/views/default/navigation
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-17 19:09:09 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-17 19:09:09 +0000
commitff6f2152bb6f0a759bffbcc213a82aecc0237ae6 (patch)
treea0ed026661677ab315069274ca05f7395e6248c5 /views/default/navigation
parent99d5f4b0d22e99109da860dd9118265c883a668e (diff)
downloadelgg-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')
-rw-r--r--views/default/navigation/site_nav.php76
-rw-r--r--views/default/navigation/topbar_tools.php5
2 files changed, 17 insertions, 64 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
diff --git a/views/default/navigation/topbar_tools.php b/views/default/navigation/topbar_tools.php
index 0e0eec097..2e48a4a85 100644
--- a/views/default/navigation/topbar_tools.php
+++ b/views/default/navigation/topbar_tools.php
@@ -9,8 +9,7 @@
* @link http://elgg.org/
*
*/
-
-$menu = get_register('menu');
+$menu = $vars['config']->menu_items['toolbar'];
if (is_array($menu) && sizeof($menu) > 0) {
$alphamenu = array();
@@ -26,7 +25,7 @@ if (is_array($menu) && sizeof($menu) > 0) {
<ul>
<?php
foreach($alphamenu as $item) {
- echo "<li><a href=\"{$item->value}\">" . $item->name . "</a></li>";
+ echo "<li><a href=\"{$item->value->url}\">" . $item->name . "</a></li>";
}
?>
</ul>