How to insert these additional menu items programatically into the main menu?

In desktop view i have placed these icons by creating seprate block and placed it into twig template just after main navigation menu into the same div,but in mobile menu this icon block is rendering out side the main menu ,i just want to create such mobile menu when user click on it a menu should open along with these icons.

How do I create menu links programmatically?

I am following the above link i think this will solve my issue but i am not able to figuring out where to put this code.

I have to create a custom module or something else that is not mentioned in the above link.

enter image description here

I am not able find any way to render these icons in mobile menu, i am using bootstrap menu.

  • when u open it in mobile view submenu is visible or it doesnt render submenu ?? – Shreya Shetty Mar 21 '17 at 9:49
  • yes it do,it shows 3 level menu – user52318 Mar 21 '17 at 11:23
  • 1
    wunderkraut.se/blogg/… this can help you . the code is written in custom .module file – Shreya Shetty Mar 23 '17 at 7:39
  • thanks @shreya,trying to figuring out by your shared link – user52318 Mar 23 '17 at 8:48

Your Answer

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