How to integrate Solr search block in header of layout?

83 Views Asked by At

Typo3 project. I installed the Solr Search extension. In the backend, it is possible to add a search block as a content element. But I need to insert a search block in the layout header. How can this be done?

I've tried inserting a form in the Header block, but that doesn't work.

1

There are 1 best solutions below

3
Thomas Löffler On

When you only want to have an input field, you need a simple HTML or Fluid form targeting to your search result page and using the correct GET parameters:

<form action="/results">
    <input type="text" name="tx_solr[q]" value="" />
</form>