diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-10-13 04:46:31 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-10-13 04:46:31 +0000 |
commit | de99844cbb766b32073ba6b98324219b66ad94ee (patch) | |
tree | c8aeec0f77d2d6c151679cb1fd2f3f2597d432f8 /includes | |
parent | 404994e85f9ca503f94c9a1fce908b637b8020c5 (diff) | |
download | brdo-de99844cbb766b32073ba6b98324219b66ad94ee.tar.gz brdo-de99844cbb766b32073ba6b98324219b66ad94ee.tar.bz2 |
#249571 by pwolanin: Fix bug with 'active-trail' class in Primary/Secondary links.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/menu.inc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index a92481634..e6d96c392 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -1317,19 +1317,15 @@ function menu_navigation_links($menu_name, $level = 0) { $links = array(); foreach ($tree as $item) { if (!$item['link']['hidden']) { + $class = ''; $l = $item['link']['localized_options']; $l['href'] = $item['link']['href']; $l['title'] = $item['link']['title']; if ($item['link']['in_active_trail']) { - if (empty($l['attributes']['class'])) { - $l['attributes']['class'] = 'active-trail'; - } - else { - $l['attributes']['class'] .= ' active-trail'; - } + $class = ' active-trail'; } - // Keyed with unique menu id to generate classes from theme_links(). - $links['menu-' . $item['link']['mlid']] = $l; + // Keyed with the unique mlid to generate classes in theme_links(). + $links['menu-' . $item['link']['mlid'] . $class] = $l; } } return $links; |