I'm trying to output a menu with all of its submenus into a template file, currently I'm using the code below. The problem is that it only displays the top level links. If I pass the second $level parameter into menu_navigation_links it'll then only display that one level, not any of the others above or below.
How can I display all the different menu levels & still have the ability to add classes to the as below? The title isn't really that important as I can 'hard code' that tag into the template file.
print theme('links__menu_top_page_navigation', array('links' => menu_navigation_links('menu-top-page-navigation'), 'attributes' => array('id' => 'main-menu', 'class' => array('main-menu', 'list-menu')), 'heading' => array('text' => t('Main menu'),'level' => 'h2','class' => array('main-menu-title'))));
The closest thing I've found so far is to use menu_tree_all_data() & menu_tree_all_output() but I cannot see how to edit the class using that.