I am new to druapl theme development. Created hierarchical menu from drupal admin. I want to render this menu in my page.tpl.php file. I have used following code, But its not rendering submenus. Its not that its showing them as display none, But they are (sub menus) not rendered at all.
$params = array(
'links' => menu_navigation_links('menu-eschopper-main-menu'),
'attributes' => array(
'class'=> array('nav','navbar-nav','collapse', 'navbar-collapse'),
),
);
print theme('links', $params);
The function you are using 'menu_navigation_links' only displays links for a single level. You would be better looking at either the menu block module (https://www.drupal.org/project/menu_block) or using functionality such as the example below:
This function will return a menu tree starting at a given url for a given depth.
The following code will produce a sub menu, with the current page as a parent and show child items up to a depth of 2.