M2 - After move catalog.topnav to header.panel how to include catalog.topnav inside hamburger menu in mobile view

magento.stackexchange https://magento.stackexchange.com/questions/328515

  •  15-04-2021
  •  | 
  •  

Question

After creating a custom theme that is inherited from a blank theme i am getting an error in mobile menu,

My mobile menu look like,

enter image description here

How to move all my categories into the left hide bar(toggle menu) i mean

enter image description here

any help thanks.

Note (web-view) - Moving element using <move element="catalog.topnav" destination="header.panel" after="logo" />

How to move catalog.topnav into hamburger menu in the mobile view?

Was it helpful?

Solution

You have to move navigation.sections instead of catalog.topnav and destination shoud be header-wrapper like below:-

<move element="navigation.sections" destination="header-wrapper" after="logo" />
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top