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');

Comments

alexpls’s picture

In Drupal 7 you can achieve this by using:

<?php 
print theme('nice_menus_main_menu'); 
?>
extensive’s picture

This code in working perfectly in drupal 7.

bouncelot’s picture

This works OK in Drupal 7 if you only want to use the top level menu items, but it doesn't seem to include the second level menu items.

suman.jis’s picture

alexpls very helpful...nice job.

It works for me in Drupla 7

freelylw’s picture

Hello

I am using 6.x version

I have paste the code in my page.tpl.php, but the menu doesn't show up on the primary links area. I am wondering because I have 3 nice-menu block, How the system know which block would be print to the primary links area ? Thanks