How to add active class to a specific menu only, while ignoring other menus? I have 2 conflicting menus I need to solve by adding an active class to a targeted menu only, they are a user menu and a profile and account settings menu which have overlapping links.


User Menu (in the header section of every page): 


[username] (links to Profile2 page)

Account Settings  (i.e. change password, etc.)
Log out


Profile and Account Settings menu (appears in the sidebar of the profile2 and account pages):


View Profile (links to Profile2 page also)
Edit Profile
Account Settings (same link destination as "Account Settings" of User Menu)
Order History



Since I'd like to convey to my users that whenever they are in any page linked by the Profile and Account Settings menu (eg. Edit Profile)I tried using Context to set an .active class for "User Menu>Profile", which worked.

However, now that "User Menu>Profile" is active when I'm in "Edit Profile", since "View Profile" shares the same link destination as "User Menu>Profile", both "View Profile" and "Edit profile" are have an .active class, which is very undesirable.

Hence, I would like to know, if there is a way to use Context or any hooks to set an .active class for the User Menu only when I'm in the "Edit Profile" page?
Try the  following modules

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.


I've used Menu Position module for one of my project and it works great!

OR

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