I have an exposed a filter to a page like so in drupal: http:example.com/user?profile=12 There is a menu entry for this specific link in a block in the sidebar. Is there a way drupal can add the .active class to the link with this specific url. Currently the active class is applied to links with this pattern: http://example.com/user?profile*

Which happen to be all links in that block.

1 Answer 1


A page with optional filters set in the url is not treated as a new different page, hence the .active class is applied on all pages with the same pattern. Use of a contextual filter such that the path changes to something like:


will fix this problem, since each new url will be pointing to a new page.

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.