I'm looking if it's possible to put the search engine in a block. What I use at the moment is:

{{block class="Magento\Search\Block\Term" template="Magento_Search::form.mini.phtml"}}

But if I add a module for the autocomplete it doesn't work. So, maybe I don't use the right code for the block...

Some help will be welcome.

1 Answer 1


Until I know it can be moved to one Container.

If for example you want to create custom container in header and move search there, you can edit your default.xml


and include:

<move element="top.search" destination="your.container" />
<referenceContainer name="header.container">
    <container name="your.container" htmlTag="div" htmlClass="your-container" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.