I installed this module on top of my Drupal 8.1.9 installation. I activated the module and created a structure like:

* About me: /about-me (default content type "Basic page")
* My home: /about-me/my-home (default content type "Basic page")

and

* Gallery: /gallery (View Page)
* First gallery: /gallery/first-gallery (own content type "Gallery")

I added the pages to the menu. "My home" is a child of "About me" and "First gallery" is a child of "Gallery".

I then expected that when I'm on "My home" or "First Gallery" that the menu items "About me" or "Gallery" gets some class which marks them as active trail menu items. But there is no class.

Can anyone confirm this bug or did I just miss something to get it working?

Comments

TiMESPLiNTER created an issue. See original summary.

TiMESPLiNTER’s picture

Issue summary: View changes
TiMESPLiNTER’s picture

Status: Active » Closed (works as designed)

Okay my fault. I started creating an own theme based on "stark". stark does not change menu.html.twig and the core version of this template does not render "active-trail" information. When I override the menu.html.twig file in my theme an render a class if "item.in_active_trail" is true everything works as expected.

idiaz.roncero’s picture

I also got this issue when using "stable" as a base theme. It is neither critical nor a bug, but easy to overlook when starting with Drupal 8, even for seasoned Drupal 7 folks.

Stable and Stark are both very common as base themes, so I would expect more people to have this issue. I'd suggest maybe making a brief reference to this in the documentation? (something like: if not working, please doble check your theme templates and make sure "item.in_active_trail" is getting some value).