Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If I create a context that sets an active menu, an active class gets added to the menu link.
This happens even if it's the current page, which means the link ends up with two active classes as the l() function adds one as well.
Comment | File | Size | Author |
---|---|---|---|
#1 | context-duplicate-active-classes-1828018.patch | 638 bytes | Leon Kessler |
Comments
Comment #1
Leon Kessler CreditAttribution: Leon Kessler commentedThe context_preprocess_menu_link function should check whether the link is the current path, and only add the class if it isnt.
Comment #2
Leon Kessler CreditAttribution: Leon Kessler commentedComment #3
hass CreditAttribution: hass commentedCan you verify if latest changes may fixed the issue and if not re-role. A re-role is required for sure.
Comment #4
hass CreditAttribution: hass commentedYour code fails if you have views tabs. On the base tab at path "/foo" it works, but not not with "/foo/bar".
Comment #6
hass CreditAttribution: hass commented