Hi, there.
I've hit a snag. I have a 2 level menu structure and using the same menu for primary and secondary, like so
Item 1
-- Item A
-- Item B
Item 2
-- Item C
Item 3
-- Item D
-- Item E
Item 4
All menu items link to panel pages. What I want to do is when I click Item B, Drupal should still consider Item 1 as the active menu item.
I've looked at menu trails module, so far I can only set the active menu item based on the content type (I can't do this, all my items are panels). I've also thought about using taxonomy, since menutrails lets me choose the parent menu based on the node's taxonomy, but for the life of me, I can't find how to assign a panel page to a taxonomy term (panel pages defined in admin/build/pages). What am I missing?
Or is there another way of doing this?
Comments
was staring me in the face...
I was looking at "a.active" in the firebug and didn't see that a submenu item's parent gets "li.active-trail".
Problem solved! Now I've got 6 hours to sleep!
Russell JVM Gutierrez
Manager, Hong Kong Projects
flippingNORMALS
Web | Social Media | Mobile
Russell JVM Gutierrez
override on template.php
I'm not sure why it wouldn't work but if I am stucked on something like this, I would rather override it on template.php under yourtheme_preprocess_page(&$vars, $hook) function
$vars['main_menu_links'] = youroverride....
$vars['secondary_menu_links'] = your override....
How would you impelment this with Panels args?
I have a panel which holds three different views - which construct a group's home page.
Groups are menu items in my primary links menu - I am usig active trails to set og node types associated with the corresponding menu link so when content affiliated with group A is submitted A menu is selected.
The problem begins when my views title (as I mentions 3 views are constructing my group home page) are "active" and they are generated by views args (so there isn't a menu associated within the view - well there is but it looks somehitn like "top-stories" and the panel passes the %1 to is) - how would I set the active trail to it?
Any ideas anyone?
D-6.13 with panels
og 6.x-2.0
og_panels 6.x-2.0
views 6.x-2.6
menutrails 6.x-1.0
I could using the correct snippet add a yourtheme_preprocess_page set the active trail acording to the %1 passed to the panel
No trees were killed in the process of sending this message. However a large number of electrons were terribly inconvenienced...
No trees were killed in the process of sending this message. However a large number of electrons were terribly inconvenienced... - please think twice before printing.
This works great!
http://drupal.org/project/menu_trail_by_path