From 29c90043277bb919275e9cea3f99393f8d4c9953 Mon Sep 17 00:00:00 2001 From: brettp Date: Mon, 14 Mar 2011 02:44:09 +0000 Subject: Fixes #3103. Re-added code accidentally removed in r8611 that broke page menu selected items. git-svn-id: http://code.elgg.org/elgg/trunk@8700 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/navigation/menu/page.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/views/default/navigation/menu/page.php b/views/default/navigation/menu/page.php index c7d858e1d..56a288234 100644 --- a/views/default/navigation/menu/page.php +++ b/views/default/navigation/menu/page.php @@ -16,6 +16,15 @@ 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, -- cgit v1.2.3