Magento 2 : How to use Default Menu in Mobile view?
-
07-01-2021 - |
Pergunta
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 ?
Solução
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.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange