The dropdown menus are cool, but I need to have the children pages show up when you click on a parent page. So for instance when I roll over "About" I might see things like "History" and "Staff". However, I need "History" and "staff" to show up in the secondary links location when I am on the "About" page.
I watched the first part of this video which makes it look as easy as making a setting change on the admin -> menu section.
http://www.lullabot.com/node/444/play
However, this is not making it work as desired. I am wondering if something has to be changed in the template files to make the secondary links display children of primary links??
Thanks in advance for any help
Yes, the Lullabot method should have worked. There was a minor difference in our 'page.tpl.php' file and I didn't realize it was preventing the menus from working that way. I've attached an updated version of page.tpl.php to this post, so you should be able to just overwrite the old one if you haven't already changed it yourself (and you'll need to remove the .txt extension).
Also note that once you copy it over you should clear the cache to make sure the change takes effect (Administer > Site Configuration > Performance). Additionally, I ran into a strange issue where I actually had to delete some links and rebuild them. But I think this might have been an issue on my end since I'm working with dummy links and a lot of them pointed to nowhere. Still, worth noting in case you don't see the change right away.
Also note this will disable the dropdown menus of the Primary links, because the secondary menu will be using the child items instead.
| Attachment | Size |
|---|---|
| page.tpl.php.txt | 10.6 KB |
That fixed it, thanks so much! However, now my drop-downs no longer work. I have removed and re-created the pages, cleared the cache and even changed the menu method in the theme configuration and still not working...? Any suggestions?
Thanks again!
Maybe I'm misunderstanding - but the drop-down won't work on the primary menu if you have the child items of the primary menu set to appear in the secondary area. It'll only support one or the other.
Hi,
I am also trying to accomplish the same thing i believe..
Primary links -- want the hover over to still be active.. BUT
when you click on the primary, or any of the children I would like the children to now appear inside of the secondary links row (with the primary links over over still working)
Example menu:
Home
Videos (Home, Original, Movies)
Groups (Home, USA, International)
When I am on the Videos Home page I would like Home, Original, & Movies to appear in the secondary links.
The end effect I would like to accomplish is to highlight the current "active" primary links tab, as well as the active secondary links item.
For example:
When I am on Videos Home, Videos primary tab is active/highlighted (and hover still works)
But also on the Secondary links Home is displayed, also active/highlighted (different color text).
I mentioned in another post the module "Menu Trails" may be the solution, but I have been playing around with this.. and no luck yet...
The altered page.tpl.php file I attached above will allow you to display the children of the primary links in the secondary menu. Once you overwrite the old page.tpl.php file, you'd navigate to Administer > Site Building > Menus > Settings and change the source for the Secondary Links to Primary Links. This will eliminate the dropdown menus from the primary links menu, though, since those child items will be used in the secondary menu instead.
I understand what you want as far as having active links hightlighted, and it's going to require additional CSS work/changes to the CSS. Menu Trails probably isn't what you're looking for. I'll try to get to this sometime soon.
Thanks Rob,
I have installed Menu Trails and it does look like the right direction.. I think. It add's a "active-trail" to each bullet..
e.g. li class="menu-117 active-trail"
you'll see on http://www.patriotguide.com/change/node/4221
From what I understand, all we need to do then is style this active-trail approriately. However, it seems that Menu trails only works for either Primary links OR secondary links, not both in unison.




