I'm interested in building my navigation with the primary and secondary links, but I want it to be dynamically displayed and controlled via javascript. For instance, I want to show my primary links, and then when I scroll over each link the "secondary links" for that menu item would show up via javascript. I have all the JS to do it, but how do I get the children of each primary link through Drupal?

Reference: the example of the functionality on the site I'm trying to convert.

Comments

joelstein’s picture

Anyone have any ideas how I can do this?

dreed47’s picture

The primary links and the secondary links are really two different menus. You can build any hierarchial structure you want by just using the primary links and display it with your javascript. You can build your primary links by going to admin/menu. You could also use the nice menus module to easily point the nice-menu js menu to the primary links menu tree.

joelstein’s picture

Thanks, ber! I didn't quite use this solution, but it pointed me in the right direction. I created my own function to dynamically build the primary links and apply the 'onmouseover' javascript to each one, and then built the secondary links in the same function. Very useful. Got most of my inspiration from looking at the Nice Menus module and the menu_tree function.

jonodunnett’s picture

An old thread but I'd like to get the same functionality. Can anyone offer a hint on how to acheive this please?

I can kind of see where I need to go to get there but need a bit of help. any offers?

bvmf’s picture

Sorry, coming from a not-so-technically-advanced-user I was wondering just exactly HOW one would use the nice menus to easily point the nice-menu js menu to the primary links menu tree?

would this involve making a new menu called primary and somehow making this menu appear in the primary menu div?

I can get my nice menu to show up, but it's a matter of putting it in the header that's my issue....

thanks so much.