Problem/Motivation

In order to have my menu items hilighted using the path I installed the Menu Trail by Path module who is using the property active_in_trail of menu items.

Saddly the active class is not added to menu or dropdown item.

For a quick fix I overrided the navbar-nav pattern & dropdown pattern to add the class using item.active_in_trail state.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

stephane aimar created an issue. See original summary.

grimreaper’s picture

Version: 5.0.0-beta1 » 5.1.x-dev
Assigned: Unassigned » grimreaper
Issue tags: -menu, -dropdown, -active-trail
grimreaper’s picture

In UIP 2: Need to alter the LinksPropType normalization to add an HTML attribute to the links based on in_active_trail.

In USB: Change the active-link.js file to use this attribute too.
In Sobki (until extracted to a generic module): change the event subscriber to use this attribute too.

grimreaper’s picture

Assigned: grimreaper » pdureau
Status: Active » Needs review

  • grimreaper committed 64410067 on 5.1.x
    Issue #3494725 by grimreaper, stephane aimar: Menu item - Active in...
grimreaper’s picture

Assigned: pdureau » Unassigned
Status: Needs review » Fixed

grimreaper’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.