0

I want to print the menu items as follows.

Menu1   Menu 2    Menu3     More
                            Menu4
                            Menu5  

I am getting them as in the following screenshot.

enter image description here

The More menu should contain only Menu 4 link. I created these menu links from the administrative pages.

enter image description here

I printed the menus using the following code.

$menutopleft = menu_navigation_links('menu-top-left-menu');                 
print_r(theme('links__menu-top-left-menu', array('links' => $menutopleft)));
  • Drag the Menu4 and put under the Our restaurants. Try this and remove your code. – Karuna Feb 7 '17 at 9:42
0

Try this from admin panel. Create hierarchical menu for this. See the screenshots

enter image description here

enter image description here

enter image description here

| improve this answer | |
  • - I had already tried the option provided by you but still i am not getting the dropdown like displaying in your screenshot.Can you please provide me some code used for dropdown or any module name used to show as dropdown . – Phanindra Feb 6 '17 at 13:07
  • Expand the parent menu which you want to create hierarchical and add all other menu under this parent menu.( enable show as expanded checkbox. ) – Karuna Feb 6 '17 at 13:52
  • :Hi,i did all the changes mentioned above but still i am not getting the child menu links.Can you please provide the code to render child menu links? – Phanindra Feb 6 '17 at 14:08
  • this is done by the admin panel not from code. please send me the screenshot ,which steps you follow for creating the menu. – Karuna Feb 7 '17 at 4:36
  • -I had joined recently to this community so site is not allowing me to upload more than 2 screenshots to this question .i am unable to send you screenshots.but i followed the same process as you did in your screenshots. For rendering the menu links i had used the code that i mentioned in my question .is it true? – Phanindra Feb 7 '17 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.