Print the main menu in overridden node page In development site. I am using sitemap page so i need to print the all main menu and submenu in that page. I am using this code, but it is not working.

$main_menu = menu_navigation_links('menu-main-page');
echo '&lt;pre&gt;main menu';print_r($main_menu);


How can I achieve it?
If you want to render the menu for sitemap purpose, better to use the "Sitemap" module

Configuration page from this link

admin/config/search/sitemap


You can see the below screen on configuration page,



Just check the menu, which you want to display in sitemap.

After this you can access your page with /sitemap url and you can see your menu there on that page.