29 July 2011

How to print sub-menus or any level menus in Drupal 7. You get only sub-menus of the current page you are on.

Source code viewer
  1. echo theme('links__system_main_menu', array(
  2. 'links' => menu_navigation_links('main-menu', '1'),
  3. 'attributes' => array(
  4. 'id' => 'main-menu-level-2-id',
  5. 'class' => array('links')
  6. ),
  7. ));
Programming Language: PHP