Problem: Secondary list items show as active only if they have links that are equal to the current path. So if there are extra path parts, the active secondary item doesn't display as active.
Cause: The selector used to indicate the active secondary list item (e.g., in secondary local tasks) ignores the 'active' class for the li and instead looks for an 'active' class for the a tag. Since it's added (in function l()) only if ($path == $_GET['q']), this a tag class will be present if - and only if - the link is the current path.
Fix:
Change the css selector
ul.secondary a.active {
to
ul.secondary li.active a
in drupal.css, to match the selection done for primary links. (The attached patch also fixes a reference in the Pushbutton theme, the only other core reference.)
This way, secondary links display properly irrespective of whether they are the current value of q.
| Comment | File | Size | Author |
|---|---|---|---|
| drupal-css-active-secondary-li.patch | 1 KB | nedjo |
Comments
Comment #1
drummNo longer applies.
Comment #2
ricabrantes commented4.x is no longer supported...