From dc76b92badcbcc3d04c9ce4e221dbec5232b2df4 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Fri, 22 Apr 2011 23:53:05 +0000 Subject: Fixes #3282: Added a class to menu items which includes menu item name (just like ul contains a class with the menu name) git-svn-id: http://code.elgg.org/elgg/trunk@9017 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/navigation/menu/elements/item.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'views/default/navigation/menu/elements') diff --git a/views/default/navigation/menu/elements/item.php b/views/default/navigation/menu/elements/item.php index 893bbd205..55ddc2fe4 100644 --- a/views/default/navigation/menu/elements/item.php +++ b/views/default/navigation/menu/elements/item.php @@ -21,8 +21,11 @@ if ($children) { } $item_class = $item->getItemClass(); + +//allow people to specify name with underscores +$name = str_replace('_', '-', $item->getName()); if ($item_class) { - $class = "class=\"$item_class\""; + $class = "class=\"elgg-menu-item-$name $item_class\""; } echo "
  • "; -- cgit v1.2.3