- 🇧🇪Belgium ludo.r Brussels
Patches in #19 and #20 do not pursue the same goal.
I'm re-rolling patch #19 for version
2.x-dev
. - last update
11 months ago 2 fail - 🇧🇪Belgium ludo.r Brussels
Previous patch was missing a use statement, don't use #24.
- last update
11 months ago 9 pass - 🇨🇭Switzerland berdir Switzerland
I also just had a case in a project where the current behavior was unexpected. #20 wouldn't work for me, because it wasn't a direct link, but part of the trait. In my case, the deeper menu link wasn't actually want I wanted, it was the one higher up that was in a completely different section of the site. The deeper one was actually a cross-reference from a different section of the website.
So what would work for me is just removing the array_reverse(), which basically makes the behavior consistent with core. But that seems rather arbitrary either way. In my case, the deeper link also had extra query arguments. The logic in #19 and rerolls also seems rather arbitrary, which might or might not be what you expect.
There's ✨ Allow other modules to alter the active link trail Needs work as well, if you want to apply extra rules on matching. For this to be committed in a BC way, the behavior would probably need to be configurable and especially if it gets as complex as latest patches, requires pretty extensive test coverage to cover all those extra checks.