From 525041047efb6b8b2c912b3ed1d71089a809976e Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Tue, 28 Jun 2011 06:37:11 -0400 Subject: updated the menu item view to work with the new setLinkClass/addLinkClass methods --- views/default/navigation/menu/elements/item.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'views/default/navigation') diff --git a/views/default/navigation/menu/elements/item.php b/views/default/navigation/menu/elements/item.php index f3e46315b..5d6a7e367 100644 --- a/views/default/navigation/menu/elements/item.php +++ b/views/default/navigation/menu/elements/item.php @@ -16,8 +16,8 @@ if ($item->getSelected()) { $children = $item->getChildren(); if ($children) { - $item->setLinkClass($link_class); - $item->setLinkClass('elgg-menu-parent'); + $item->addLinkClass($link_class); + $item->addLinkClass('elgg-menu-parent'); } $item_class = $item->getItemClass(); -- cgit v1.2.3 From 469f8ba89cc3b613b88228d95f9c69cb53e5b605 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Tue, 23 Aug 2011 16:56:11 -0700 Subject: Rewriting more chars to - in the default menu view. --- views/default/navigation/menu/default.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'views/default/navigation') diff --git a/views/default/navigation/menu/default.php b/views/default/navigation/menu/default.php index 0dc6dd6b3..0fa391433 100644 --- a/views/default/navigation/menu/default.php +++ b/views/default/navigation/menu/default.php @@ -9,7 +9,7 @@ */ // we want css classes to use dashes -$vars['name'] = str_replace('_', '-', $vars['name']); +$vars['name'] = preg_replace('/[^a-z0-9\-]/i', '-', $vars['name']); $headers = elgg_extract('show_section_headers', $vars, false); $class = "elgg-menu elgg-menu-{$vars['name']}"; -- cgit v1.2.3