Liquid Components > Site Search

Hi @cretam. Can you post the treepl trial site URL for us to look at.

But here are a few things to check:

  1. In your search form, the action path is set to your search results web page:
<form action="/YOUR-SEARCH-RESULTS-PAGE">
  1. You’ve pasted the above code from @StudioRTP onto this search results page.
  2. You have a ‘Page Layout’ called “Site Search List” (go to: ‘Content’ > ‘Pages’ > ‘Edit Settings’ > ‘Layouts’), which has something like this:
<p class="lead">Showing <b>{{this.pagination.totalitemscount}}</b> items for "<b>{{request.request_url.params.SearchKeyword}}</b>"</p>
{% if this.items == null %}
<p>Sorry no results found. Try searching again with a different keyword perhaps.</p>
{% else %}
<ul>
{% for sr in this.items %}
    <li>
        <p>
            <strong><a href="{{sr.url}}">{{sr.name}}</a></strong><br>
            {{sr.description | strip_html | truncatewords: 20, '...'}}
        </p>
    </li>
{% endfor %}
</ul>
{% endif %}

Post you code from these sections if you are still having trouble.

2 Likes