Tag Archives: Nice Menus

Drupal 7 – Center a horizontal nice menu

Nice Menus is a must have module for all my Drupal 7 projects. It helps creating horizontal menu in just a few minutes.

The horizontal menu is aligned to the left by default. Here is a small CSS trick for you to align the menu in center and it also works for Superfish menu.
Continue reading Drupal 7 – Center a horizontal nice menu

Drupal 7 – Render the Nice Menus programmatically

The following piece of code will print the Nice Menus block.

$menu = theme('nice_menus', array('id' => 1, 'direction' => 'down', 'depth' => 1, 'menu_name' => '<menu-machine-code>', 'menu' => NULL));
print $menu['content'];

 

you can input any value in the <id> parameter and the rendered menu will have the HTML tag id = nice-menu-<id>. Just make sure there is no duplicated nice menu id in the same page.

Done =)

Reference: How to display nice_menus programmatically in Drupal 7

Working with menus in Drupal 7 @ 3

We have Special menu items module and Nice Menus which makes Drupal menu editing much more convenient.
Working with menus in Drupal 7 @ 1 – Special menu items module
Working with menus in Drupal 7 @ 2 – Nice Menus

But there is a bug when using both of them together. After you setup a Nice menu and you set the parent menu item path to <nolink>, the hyperlink is still there. Continue reading Working with menus in Drupal 7 @ 3