- Issue created by @G4MBINI
- π«π·France G4MBINI BΓ¨gles
@just_like_good_vibes I'll be happy to show you my issue with menus !
- First commit to issue fork.
- πΊπΈUnited States mortona2k Seattle
Loaded the menu.active_trail service to use getActiveTrailIds, and then $parameters->setActiveTrail().
- π«π·France Grimreaper France π«π·
Should it be done in the menu source or in the links prop type?
Currently the active trail is put as attribute in Links prop type, then I would say you play with that in your templates.
In UI Suite Bootstrap, I kind of follow what core does with either JS for authenticated user or event subscriber for anonymous users (need the companion module in π± [Discussion] blocked implementations and generic stuff Active )
- πΊπΈUnited States mortona2k Seattle
MenuSource is where the links are being loaded by MenuLinkTree->getMenuItems().
That's where I adjusted the parameters being passed in.
This is just like the default system menu block:
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/syste...I recall finding out that active links are not the same as active menu trail. The active tab/local task is a good example of where .is-active is used. But I think active menu trail classes are generated by the menu tree, and don't need the js for anonymous users.
- π«π·France Grimreaper France π«π·
Hello,
Stuff like item.in_active_trail is already possible.
When using a pattern with menu source. Active trail is present but not set properly.
Tested the MR and it fixes the issue.
Thanks.
Not merging because main UIP2 maintainers are now @just_like_good_vices and @christian.wiedemann, so maybe needs automated tests.