0

I'm moving navigation menu in Header container, I'm using the below code in default.xml of my theme:

<move element="catalog.topnav" destination="header.container" after="logo"/>

This works fine, but when I view this in mobile/responsive view, the menu doesn't show the correct Navigation items,instead it's displaying Header Links (Sign up, Sign In).

Without moving in the Header, the responsive menu is correct what is expected.

3

Try this code:

<move element="navigation.sections" destination="header-wrapper" after="logo"/>
4
  • Thanks, it worked! One more, same is the case with the header.links (Sign In, Sign up). I moved them inside header wrapper but now they are removed in responsive menu.
    – user54226
    Oct 9 '18 at 13:49
  • What xml you have written for top links? please share Oct 10 '18 at 6:45
  • <move element="header.links" destination="auth-block" before="head-info-text"/> I used the above line in default.xml to move the header link to Header Content area, in a div 'auth-block', this works fine, but in responsive view, these links doesn't appear in the Menu slider.
    – user54226
    Oct 15 '18 at 10:57
  • Use this code: <move element="top.links" destination="auth-block" before="head-info-text"/> Oct 17 '18 at 12:31

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.