I am working on a Magento 2.1.7 shop. To achieve this, I have created a child-theme of Magento Blank.
I want to display the search bar above the top links, at the right of the logo:
For this purpose, I wrote the line below, in my default.xml
file:
<move element="top.links" destination="header-wrapper" after="logo" />
<move element="top.search" destination="header-wrapper" before="top.links"/>
<referenceContainer name="header.panel">
<block name="panel.top.links" class="Magento\Framework\View\Element\Html\Links" after="-">
<arguments>
<argument name="css_class" xsi:type="string">header links</argument>
</arguments>
</block>
</referenceContainer>
<referenceContainer name="header.panel">
<block name="panel.top.search" class="Magento\Framework\View\Element\Html\Search" after="-">
<arguments>
<argument name="css_class" xsi:type="string">header search</argument>
</arguments>
</block>
</referenceContainer>
The <block name="panel.top.search" class="Magento\Framework\View\Element\Html\Search" after="-">
part produces the error: Class Magento\Framework\View\Element\Html\Search does not exist in the browser.
As you can see, on the website's homepage, the search box does not appear anywhere.
What am I doing wrong? How shall I change my code to make it work?