Multilevel Primary Menu

Component ID

867642

Component name

Multilevel Primary Menu

Component type

module

Component security advisory coverage

not-covered

Downloads

1368

Component created

Component changed

Component body

This module allows to embed primary menu in the theme as a tree instead of the first level only.

It keeps classes and other stuffs applied by other modules (Menu Class for instance).

To use it, replace :

<?php print theme('links', $primary_links, array('id' => 'main-menu', 'class' => 'links clearfix'));?>

by

<?php print theme('multilev_menu', 'primary-links',array('id' => 'main-menu', 'class' => 'links clearfix'));?>

You can also use this code to find the name of your primary links menu :

            <?php if ($primary_links){
            	if ($primary_links_name) $menu_name = $primary_links_name;
		        else $menu_name = variable_get('menu_primary_links_source', 'primary-links');
		        print theme('multilev_menu', $menu_name,array('id' => 'main-menu', 'class' => 'links clearfix'));
            }
	        ?>