Let's say I have the view with arguments. My path to view page is /products. The path that contains argument eg. 3 looks like this /products/3.

Now as the view is displayed without arguments and the product path is in the main menu - active class for menu item is displayed correctly, however if I add path with argument product/3 and link it in my menu then there's not active item.

How to extort Drupal to show active item?

1 Answer 1


There are couple of modules for this.

1)Menu Position

Often times site builders want certain types of content to appear in a specific position in the navigational menu. The simplest solution, adding all of that content individually to the menu system, has performance and usability issues. (Imagine hundreds of menu items added to one spot in the menu.)

This module allows for the creation of rules that will dynamically add the current page into the menu system at the requested spots.

2) Menu Trail By Path

Menu Trail By Path sets the active-trail on menu items according to the current url.

For example if you are at yoursite.com/blog/category1/article1 Menu Items with these paths will get the active-trail class on them and expand accordingly.

blog blog/category1 blog/category1/article1

Note: I'm not sure about(didn't use) Menu Trail By Path module. but I used Menu Position module and works great for me.


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.