I am working on a Magento 2.1.7 shop. To achieve this, I have created a child-theme of Magento Blank.

I have installed and enabled the Magento 2.0 SmartSearch and I want to display the search bar, which currently does not display anywhere, above the top links, like the screenshot indicates:

enter image description here

In app/code/Sebwite/SmartSearch/view/frontend/layout/default.xml I have added this line <move element="top.search" destination="header-wrapper" before="top.links"/>:

<referenceContainer name="header-wrapper">
  <referenceBlock name="top.search">
      <argument name="template" xsi:type="string">Sebwite/SmartSeach/templates/form.mini.phtml</argument>
<move element="top.search" destination="header-wrapper" before="top.links"/>

But no change occurred.

Inside the same file, the logo blook looks like this:

<referenceContainer name="header.container" htmlId="siteHeader" htmlClass="panel wrapper fullwidth">
  <container name="header-wrapper" label="Page Header" as="header-wrapper" htmlTag="div" htmlClass="header content">
    <block class="Magento\Theme\Block\Html\Header\Logo" name="logo">
        <argument name="logo_file" xsi:type="string">images/logo.png</argument>
        <argument name="logo_img_width" xsi:type="number">263</argument>
        <argument name="logo_img_height" xsi:type="number">85</argument>

Is there anything I can add to it to display the search box, who's template is app/code/Sebwite/SmartSearch/view/frontend/templates/form.mini.phtml inside the logo block? I would then only have to float it right.

  • looking into the code of the module sebwite, they have setup the form.mini.phtml file (github.com/Sebwite/Magento2-SmartSearch/blob/master/view/…). can you please check if this file is rendering on the website header? – Tejas Vyas Dec 27 '17 at 13:17
  • adding to the previous message, best way is to modify the the code. – Tejas Vyas Dec 27 '17 at 13:18
  • How? In what way? – Razvan Zamfir Dec 27 '17 at 13:23
  • I need to move that code after the logo. It is not even visible in the source. What should I do? – Razvan Zamfir Dec 27 '17 at 16:13

can you make sure module is enabled and you did setup upgrade?


php bin/magento setup:upgrade

can you send link here to see output?

| improve this answer | |

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.