1
 <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> </container> </container> 

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?

Thanks

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

1 Answer 1

0

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" /> 
3
  • No worries i always miss little things like this sometimes you just need another set of eyes. Commented Jun 13, 2017 at 13:15
  • Good spot, I compared that with the template name and missed it O.o Commented 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. Commented Jun 13, 2017 at 13:23

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.