1

I am writing modules that define content entities in Drupal 8. The Drupal console creates the menu items for the list builder. I would like the menu to stay open (having the menu-item--active-trail class) when I access the view or edit form page of, say, the content entity with id 4.

The breadcrumb navigation works perfectly out of the box, but the menu is completely closed for the content entity with id 4.

I am ok with writing a Menu Plugin or using a contributed module.

1 Answer 1

0

My solution turned out to be the contributed module Menu Trail By Path: because I can fine-tune the actual URLs in all of my entities' YAML files, I can define the hierarchy easily.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.