How to set a menu item active ? I have a site that has a lot of menus. One of them is the main menu that has few items. These items link to main areas of the site, and each of these main areas has one specific menu. When I'm on a landing page of one of these main areas, the item of it on the main menu is active, but when I'm on an internal page of one of these areas, the item on the main menu is not active. 

Is there any way to make it active automatically?

I tried using menu_position but it seems not be working.
Their is a lot of ways. I list here only things compatible with D7 and eventually on D6.

Use a modules


https://drupal.org/project/menu_position (need rules, watch http://vimeo.com/27074705)
https://drupal.org/project/menu_trail_by_path
https://drupal.org/project/context


Code your stuff

Their is now a native API menu_tree_set_path to set the path you want to use to calculate the menu active trail.

You can also work in theme_links but but I recommend to use menu_tree_set_path so other module know what is your active link. The advantage is you can use this function in your theme without creating a module.

Keep in mind, menu_position has an API to create your custom rules.

So what should I use???

It's depend of your need. if you have simple rules like: for this node type/views/taxonomy i want this active menu, context is good.

If you have a good url structure (autopath) than follow your menu structure, menu_trail_by_path will just works without any effort.

I never used menu_position... so I can very tell.

If you need some special logic, coding your things is certainly faster than creating 40 context or rules...