3

Example How to move correctly block-search and minicart to panel wrapper?

  • I tried to move header wrapper into top.links but it is not succeed. I can suggest instead of moving the header wrapper into top.links. you can remove top.links and include it as custom phtml into header wrapper. – Iyappan Perumal Jul 2 '17 at 17:57
  • have you gotten answer of this question? – Sarvesh Tiwari Jan 30 '18 at 12:06
8

You need to move them to header panel, below code can do your work

<move element="top.search" destination="header.panel" />
<move element="minicart" destination="header.panel" />

Place this code in your extended default.xml under Magento_Theme module

app\design\frontend\vendorname\themename\Magento_Theme\layout\default.xml

This way you can change position of other elements as well by defining new destination to them.

Thanks

2
Magento_Theme\layout\default.xml

Move Element to Header Panel use below code

<move element="top.search" destination="header.panel" befor="-" />
<move element="minicart" destination="header.panel" before="-" />

You can use "before" = "-" to place your element at the very begin of the destination and "after" = "-" to place your element at the very end of the destination.

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.