[support] Nav Highlight Problem
sebastian
inforazor at gmail.com
Thu May 6 16:30:33 UTC 2010
This is an active trail issue.
For "most" situations, what you need to do is to assign the sub items to
the same branch as the about. This "should" work.
If it is not, then it could be an issue with the theme and how the theme
sets the active element in the menu.
In the more complex projects, setting active trail can become
complicated with Drupal; and in those instances I actually write the
menu in PHP in the template.php file and then print it on the
page.tpl.php using a funciton-return.
Using this method is my "last resort" but it does allow me to make all
nodes of a particular type mixed with node's of a particular number and
arguments of a particular value all drive the same active trail logic in
the menu's "class="active" system.
So,to sum: Ideal situation: use the drupal-way if you can [setting menu
items as hierachichal]; but if you can't because you are mixing types
with arguments with nid's; then use a function for the menu in template.php
Fred Jones wrote:
> I have a site with a primary nav across the top and secondary on the
> left sidebar. When you browse to the About Us page via the top nav,
> then of course that item is highlighted with CSS class "active."
>
> But if you then browse to one of the items in the subnav there, like
> Our History, the About Us on top is no longer active. Now this left
> hand secondary nav bar is actually a block made by the Tree Menus
> module.
>
> Now they want of course the About Us to be active for all the subnav
> items, and the same idea for all the different pages, meaning the
> subnav items of "Our Programs" should all load with "Our Programs"
> active in the top nav. In the primary nav, Our History has About Us as
> its parent--of course they're all like that.
>
> So really the question is I think: How can I tell the primary nav to
> make "active" the parent of the menu item from the Tree Menu block on
> the left?
>
> Thanks
More information about the support
mailing list