{% extends CMS_TEMPLATE %} {% load i18n thumbnail pcart_core theme_tags %} {% comment %} The search.liquid template is not a required template. That search.liquid template is included in the current theme to make it easier for you to customize your /search page. Whether you are using your own template for the search page or not, the {{ content_for_header }} tag in theme.liquid will always output the following on the /search page: So the /search page is always styled by a globally-hosted stylesheet called search.css. You may override and complement that CSS in your theme's stylesheet. We are using a div#searchresults below so that the styles defined in search.css get applied to the elements on this page; the 'searchresults' id is used in the CSS selectors inside search.css. {% endcomment %} {% block content %}

Search results for "{{ search.terms | escape }}"

{% comment %} search.performed is false when accessing the /search page without a 'q' parameter set in the URL. A shop-owner can link to the /search page from one of his link lists. It is important to show a search form on that page if search.performed is false. {% endcomment %} {% if search.performed %} {% comment %} Common pitfall to avoid: search.results should never be accessed before the opening paginate tag. Move the opening and closing paginate tags to the very top and bottom of your search.liquid template if you need to. If you fail to do the above, the pagination of search results will be broken. search.results_count is fine to access in or out of the paginate block. {% endcomment %} {% if search.results_count == 0 %}

Your search for "{{ search.terms }}" did not yield any results.

{% else %}
    {% for item in products %}
  1. {{ item.title|link_to:item.get_absolute_url }}
    {% if item.featured_image %} {% endif %}
    {{ item.content|striptags|truncatewords:40 }}
    {# |highlight:search.terms #}
  2. {% endfor %}
{% endif %}
{% include "catalog/includes/pagination.html" %} {% endif %}
{% endblock %}