Using Context and Menu Trail to establish subnavigation by taxonomy term
Context is a great module, but the settings page is a little misleading. You can set a context to operate when a node tagged with a term. You can set as a reaction that one of your menu items is made active. However, when you navigate to the page for that node with the menu loaded into a block, the active item is not indicated. Works fine if the menu is on the main part of the page, but not in a block. This is true for any menu — primary, secondary or custom.
We’re working on a site which has the subnavigation in a sidebar. It’s going to be used in a lot of different ways, but the simplest use case on this site is a blog, split into four categories. Each category will be treated as its own mini-blog. The four categories will be in the sidebar. When you’re viewing a post in the Book blog, then the Book link should be active in the sidebar.
It turns out this is really easy to do if you use Menu Trails, in addition to Context. Let context set up the display of the block holding the menu, but then associate each category with the correct menu item in Menu Trail. Together, they will present the menu when you want it and highlight the correct link.

Discussion Area - Leave a Comment