diff options
author | cash <cash.costello@gmail.com> | 2011-12-08 19:28:56 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-12-08 19:28:56 -0500 |
commit | cb20d84a4ce17c8071e8f474b82341ec1aec083d (patch) | |
tree | c1ddfac4481b6999c7202969bae2eb3291ebbd09 /views/default/navigation/menu/default.php | |
parent | e4067b9e9146de425dc391bbe3767a9ca3e4e602 (diff) | |
download | elgg-cb20d84a4ce17c8071e8f474b82341ec1aec083d.tar.gz elgg-cb20d84a4ce17c8071e8f474b82341ec1aec083d.tar.bz2 |
added the ability to pass a class to be applied to all menu item <li> elements
Diffstat (limited to 'views/default/navigation/menu/default.php')
-rw-r--r-- | views/default/navigation/menu/default.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/views/default/navigation/menu/default.php b/views/default/navigation/menu/default.php index 0fa391433..006deb3ea 100644 --- a/views/default/navigation/menu/default.php +++ b/views/default/navigation/menu/default.php @@ -2,15 +2,17 @@ /** * Default menu * - * @uses $vars['name'] - * @uses $vars['menu'] - * @uses $vars['class'] - * @uses $vars['show_section_headers'] + * @uses $vars['name'] Name of the menu + * @uses $vars['menu'] Array of menu items + * @uses $vars['class'] Additional CSS class for the menu + * @uses $vars['item_class'] Additional CSS class for each menu item + * @uses $vars['show_section_headers'] Do we show headers for each section? */ // we want css classes to use dashes $vars['name'] = preg_replace('/[^a-z0-9\-]/i', '-', $vars['name']); $headers = elgg_extract('show_section_headers', $vars, false); +$item_class = elgg_extract('item_class', $vars, ''); $class = "elgg-menu elgg-menu-{$vars['name']}"; if (isset($vars['class'])) { @@ -23,6 +25,7 @@ foreach ($vars['menu'] as $section => $menu_items) { 'class' => "$class elgg-menu-{$vars['name']}-$section", 'section' => $section, 'name' => $vars['name'], - 'show_section_headers' => $headers + 'show_section_headers' => $headers, + 'item_class' => $item_class, )); } |