views:

121

answers:

1

I'm using Development Seed's fantastic Context module (version 6.x-2.0) for Drupal 6 on a site that I am developing. Everything is working fine except in the case where I need to set a context for a particular menu trail.

Perhaps I am misunderstanding the menu trail condition, but the context only exists when the defined menu item is active and not for any of its child menu items. Should it not be following the menu trail? The menu items only exist in the primary links, so there should be no conflict.

Is it possible to hook into the context to make the menu trail part work if not through the Context UI interface?

+2  A: 

This is because Drupal, by default, sets the Navigation menu to the active menu: it affects all manner of things from Context to breadcrumbs.

You can test this by changing your condition to check a menu item in Navigation: it will fire on child menu items.

To get it to work on other menus, you need to enable or write a module that utilizes menu_set_active_menu_name to set the active menu to one where the page is a member. The module Menu Breadcrumb accomplishes this task with no configuration.

Mark Trapp
Thanks, this works a treat.
monkeyninja