In template.php file you can add the below code:
$menu = menu_tree_output(menu_tree_all_data('main-menu', null, 1));
$variables['menu'] = drupal_render($menu);
Page.tpl.php (render the main menu tree in the page.tpl.php like this.)
<?php print $menu; ?>
menu_tree_all_data($menu_name, $link = NULL, $max_depth = NULL)
[https://api.drupal.org/api/drupal/includes!menu.inc/function/menu_tree_all_data/7]
- 677 views
Add new comment