Skip to content

Commit

Permalink
Fix for search input field on search results page
Browse files Browse the repository at this point in the history
If the search input box is inside the header, it needs to contain the current search string after searching.
Before this fix, the header ESI block was cached, so this did not work. The search string was wrong or not showing.
  • Loading branch information
jeroenvermeulen committed May 4, 2014
1 parent 4a673de commit 8cb2594
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions app/design/frontend/base/default/layout/turpentine_esi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,25 @@
-->
</catalog_product_compare_index>

<!-- Catalog Search -->

<!--
If the search input box is inside the header, it needs to contain the current search string after searching.
The block below overrules the ESI Options for the header on the search results page.
We change the scope of the header to "page", so the current URL is passed to the ESI request.
We set the TTL to 0, because the same user is probably not going to search for the same string again.
-->
<catalogsearch_result_index>
<reference name="header">
<action method="setEsiOptions">
<params>
<access>private</access>
<scope>page</scope>
<ttl>0</ttl>
</params>
</action>
</reference>
</catalogsearch_result_index>

<!-- Checkout -->

Expand Down

0 comments on commit 8cb2594

Please sign in to comment.