<container name="container" label="header-container" as="header-container" htmlTag="div" htmlClass="container">
            <container name="header-options" label="header-options" as="header-options" htmlTag="div" htmlClass="header-options">
                <block class="Magento\Framework\View\Element\Template" name="language.select" template="Magento_Theme::html/header/language-select.phtml"></block>
                <block class="Magento\Framework\View\Element\Template" name="distributor.search" template="Magento_Theme::html/header/distributor-search.phtml"></block>
                <block class="Magento\Framework\View\Element\Template" name="contact.link" template="Magento_Theme::html/header/contact-link.phtml"></block>
                <block class="Magento\Framework\View\Element\Template" name="top.search" template="Magento_Search::form-mini.phtml"></block>

Im trying to add the magento top.search into my header however I am struggling to get it to show, all other blocks within Magento_Theme are working just unable to add the Magento_Search::form-mini.phtml?

Can anyone advise where I am going wrong?


  • What file did you add the code to?
    – Ben Crook
    Jun 13, 2017 at 12:44
  • this is in my default.xml in my theme
    – lky
    Jun 13, 2017 at 13:10

1 Answer 1


The file is normally named form.mini.phtml not form-mini.phtml

Replace with below:

<block class="Magento\Framework\View\Element\Template" name="top.search.custom" as="topSearchcustom" template="Magento_Search::form.mini.phtml" />
  • No worries i always miss little things like this sometimes you just need another set of eyes.
    – harri
    Jun 13, 2017 at 13:15
  • Good spot, I compared that with the template name and missed it O.o
    – Ben Crook
    Jun 13, 2017 at 13:22
  • Me too i looked at the actual file and missed its only when i looked at the original layout i noticed.
    – harri
    Jun 13, 2017 at 13:23

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.