2

I would like to use My IBNAB MegaMenu in desktop view but, In Mobile view would like to use default Luma Menu.

How can i achieve that ?

  • could you please elaborate your question? are you using any theme? – Abhishek Tripathi Apr 20 '18 at 4:49
  • @ABHISHEKTRIPATHI Yes, I am using a custom theme, developed using the default Magento theme. And for menu i am using the IBNAB MegaMenu But it's not working properly in mobile view, so can i use the default magento menu in responsive mode and the IBNAB menu in desktop view. – Jaykumar Bhojwani Apr 20 '18 at 4:58
4

I have found a solution, I am calling the default menu by the following code using it in template file of the module.

 echo $this->getLayout()->createBlock("Magento\Theme\Block\Html\Topmenu")->setTemplate("Magento_Theme::html/topmenu.phtml")->toHtml();

Now I just need to figure out some jquery stuff so that both the menus do not conflict with each other.

  • Yes that can be used to achieve your stuff & to stop the conflicts you can simply use media query – Abhishek Tripathi Apr 20 '18 at 5:10
  • 1
    @ABHISHEKTRIPATHI thanks for the suggestion, doing the same. – Jaykumar Bhojwani Apr 20 '18 at 5:12
  • Okay! Welcome @JaykumarBhojwani to the MSE 1+ from me to both your question & answer feel free to ask any help over here! – Abhishek Tripathi Apr 20 '18 at 6:02

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.