Primary links as nice menus

Last updated on
30 April 2025

This post is in the issue queue related to the Nice_menus module. It could be a help to a lot of people.

Basically you can use the theme_nice_menu_primary_links function like any other theme function. You can call it directly in your page.tpl.php or add it as a variable in your template.php.

Note: Before menu will expand on mouse over, links must be added to the menu (parents with children). Be careful when adding a lot of fly out menus when close to the right side of page as they can run off the page.
To add menu links Goto: Administer > menus > primary links

-Top Menu Link (parent)
---First Child Menu Link (drop down)
-------First Child sub-Menu Link (fly out from first child)
-------First Child sub-Menu Link (fly out from first child)
-----------First Child sub-Menu Link Child (fly out from sub-Menu Link)
---Second Child Menu Link (drop down)
-------Second Child sub-Menu Link (fly out from second child)
---Third Child Menu Link (drop down)

The default direction for a primary link with children is drop down.
The children of child links will fly out to the right.

The most basic way to call it (using version 6-2.x) is to just do:

print theme('nice_menus_primary_links');
print theme('nice_menus_secondary_links', 'down'); // example for secondary links as nice menus...

Note that in 5.x and 6-1.x the function is:

print theme('nice_menu_primary_links');

To call it using other directions:

print theme('nice_menus_primary_links', 'right');
print theme('nice_menus_primary_links', 'down');

Help improve this page

Page status: Not set

You can: