I'm using the code below to print my main menu in page.tpl.php:
<?php
$main_menu = menu_navigation_links('main-menu');
print theme('links', array(
'links' => $main_menu,
'attributes' => array(
'id' => 'main-menu',
'class' => array('links', 'clearfix'),
),
'heading' => array(
'text' => t('Main menu'),
'level' => 'h2',
'class' => array('element-invisible'),
),
));
?>
However, it is only outputting the top-level menus of my navigation. Is there a piece of code I can add that will output submenus too?
$level
argument to api.drupal.org/api/drupal/includes%21menu.inc/function/… ?$main_menu = menu_navigation_links('main-menu', RIGHT_HERE);
, eg,$main_menu =menu_navigation_links('main-menu', 1);
would go down one level,$main_menu = menu_navigation_links('main-menu', 2);
would go down two, etc.