Greetings all. I am developing a bit of a beta site for a new website and I am doing it all in Drupal. Currently 6.14.

I'm reading through the menu api system and I am having some problems figuring out how to do what I want to do.

On my page, I am creating a menu bar in the header that I populate with Primary Links. However depending on the users path, I want to populate a sub-menu in the left hand side of the body that is relative to the "section" of the site as identified by which Primary Link the user is on. Make sense?

Anyone have any thoughts on the best way to do this?

Comments

Anonymous’s picture

Go to :

/admin/build/menu/settings

And make sure that the primary AND Secondary links are using the same menu, something like :

Default menu for content: Primary Links
Source for the primary links: Primary Links
Source for the secondary links: Primary Links

Then, make sure that in the page.tpl.php, the secondary links are output in the sidebar.

Secondary Links are outputed with something like this :

if (!empty($secondary_links)){ print theme('links', $secondary_links, array('id' => 'secondary'); }

TheGorf’s picture

Thank you!! That is exactly what I was looking for.