aboutsummaryrefslogtreecommitdiff
path: root/views/default/navigation/menu
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-18 16:37:16 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-18 16:37:16 +0000
commit8ec093ecc1bf28c09f5d2dbe3c7bc8e6a2485ac6 (patch)
tree2b0c0454d9305cd61b92f57d02be06deccaf5d9b /views/default/navigation/menu
parentfc0fb6ec66aca4e439f434ce0d97df6d09388ef4 (diff)
downloadelgg-8ec093ecc1bf28c09f5d2dbe3c7bc8e6a2485ac6.tar.gz
elgg-8ec093ecc1bf28c09f5d2dbe3c7bc8e6a2485ac6.tar.bz2
site nav menu now uses new menu code (and finished the implementation of custom menu items while I was at it - not backward compatible with the previous half finished version)
git-svn-id: http://code.elgg.org/elgg/trunk@7668 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/navigation/menu')
-rw-r--r--views/default/navigation/menu/elements/item.php10
-rw-r--r--views/default/navigation/menu/site.php25
2 files changed, 35 insertions, 0 deletions
diff --git a/views/default/navigation/menu/elements/item.php b/views/default/navigation/menu/elements/item.php
new file mode 100644
index 000000000..f6959b2f4
--- /dev/null
+++ b/views/default/navigation/menu/elements/item.php
@@ -0,0 +1,10 @@
+<?php
+
+$item = $vars['item'];
+
+$class = '';
+if ($item->getSelected()) {
+ $class = 'class="selected"';
+}
+
+echo "<li $class>{$item->getLink()}</li>";
diff --git a/views/default/navigation/menu/site.php b/views/default/navigation/menu/site.php
new file mode 100644
index 000000000..c2b00fd72
--- /dev/null
+++ b/views/default/navigation/menu/site.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Site navigation menu
+ *
+ * @uses $vars['menu']['default']
+ * @uses $vars['menu']['more']
+ */
+
+echo '<ul class="elgg-site-menu">';
+foreach ($vars['menu']['default'] as $menu_item) {
+ echo elgg_view('navigation/menu/elements/item', array('item' => $menu_item));
+}
+
+if (isset($vars['menu']['more'])) {
+ $more = elgg_echo('more');
+ echo '<li class="elgg-more">';
+ echo "<a class='subnav' title=\"$more\"><span class=\"elgg-icon elgg-icon-arrow-s\"></span>$more</a>";
+ echo '<ul>';
+ foreach ($vars['menu']['more'] as $menu_item) {
+ echo elgg_view('navigation/menu/elements/item', array('item' => $menu_item));
+ }
+ echo '</ul>';
+ echo '</li>';
+}
+echo '</ul>';