aboutsummaryrefslogtreecommitdiff
path: root/views/default/navigation/menu/page.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 16:47:03 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 16:47:03 +0000
commit386aa2ce2ecd504c8e044f4e4ae34dd779ded6b9 (patch)
treeeb3f221152b366d9eacad601e55ee0a2f1c4bad1 /views/default/navigation/menu/page.php
parente917c26d53a7270b3ab4d2d283f72cfd32f3e1e2 (diff)
downloadelgg-386aa2ce2ecd504c8e044f4e4ae34dd779ded6b9.tar.gz
elgg-386aa2ce2ecd504c8e044f4e4ae34dd779ded6b9.tar.bz2
Fixes #3088: Added section header support to page and default menus.
git-svn-id: http://code.elgg.org/elgg/trunk@8661 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/navigation/menu/page.php')
-rw-r--r--views/default/navigation/menu/page.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/views/default/navigation/menu/page.php b/views/default/navigation/menu/page.php
index bd2611790..c7d858e1d 100644
--- a/views/default/navigation/menu/page.php
+++ b/views/default/navigation/menu/page.php
@@ -5,24 +5,23 @@
* @uses $vars['menu']
* @uses $vars['selected_item']
* @uses $vars['class']
+ * @uses $vars['name']
+ * @uses $vars['show_section_headers']
*/
+$headers = elgg_extract('show_section_headers', $vars, false);
+
$class = 'elgg-menu elgg-menu-page';
if (isset($vars['class'])) {
$class = "$class {$vars['class']}";
}
-if (isset($vars['selected_item'])) {
- $parent = $vars['selected_item']->getParent();
- while ($parent) {
- $parent->setSelected();
- $parent = $parent->getParent();
- }
-}
-
foreach ($vars['menu'] as $section => $menu_items) {
echo elgg_view('navigation/menu/elements/section', array(
'items' => $menu_items,
'class' => "$class elgg-menu-page-$section",
+ 'section' => $section,
+ 'name' => $vars['name'],
+ 'show_section_headers' => $headers
));
}