Create an 'active' class for partial url? I have a system of menus on a site that helps the user drill down to the page they are looking for.  If they click a link in the main nav, it might take the to /category.  On that page, a sidebar menu would direct them to /category/page.

Previously, I have used the active class to highlight a menu item while the user is on that page.  In this case, I want both menu items to be highlighted, since the page the user is on falls is a part of the main category.

To clarify, how can I keep a link active if it points to /category and the page the user is viewing is /category/page?

Thanks for the help!
There is a module for that - 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


This is particularly useful if you want a lot of nodes to appear as children of certain nodes / taxonomy term / views / referenced nodes / etc, but do not want to add them all to the menu. eg. hundreds of blog articles.

Menu Trail By Path is best used in conjunction with Pathauto.