search-results

{% assign search_pagination = section.settings.pagination_limit %} {% paginate search.results by search_pagination %}

{{ 'general.search.title' | t }}

{% if search.performed %}
  • {{ 'general.search.results_count' | t: count: search.results_count }}
{% endif %}
{% comment %}Check to see if sidebar should be enabled{% endcomment %} {% if section.blocks.size > 0 %} {% assign sidebar = true %} {% else %} {% assign sidebar = false %} {% endif %} {% if search.performed %} {% if search.results == empty %}

{{ 'general.search.no_results_html' | t: terms: search.terms }}



{% else %} {% if settings.search_option == 'everything' or search.results.first.price == blank %} {% if sidebar %} {% include 'sidebar' %}
{% else %}
{% endif %} {% for item in search.results %}
{% assign featured_image = false %} {% if item.object_type == 'article' and item.image %} {% assign featured_image = true %} {% elsif item.featured_image %} {% assign featured_image = true %} {% endif %} {% if sidebar %}
{% endfor %}
{% else %} {% if sidebar %} {% include 'sidebar' %}
{% else %}
{% endif %} {% assign products = search.results %} {% assign products_per_row = section.settings.products_per_row %} {% include 'product-loop', sidebar: sidebar %}
{% endif %} {% endif %} {% include 'pagination' %} {% else %}


{{ 'general.search.description' | t }}

{% endif %} {% endpaginate %}
{% schema %} { "name": "Search", "class": "search-template-section", "settings": [ { "type": "select", "id": "products_per_row", "label": "Products per row", "options": [ { "value": "2", "label": "2" }, { "value": "3", "label": "3" }, { "value": "4", "label": "4" } ] }, { "type": "select", "id": "pagination_limit", "label": "Products per page", "options": [ { "value": "24", "label": "24" }, { "value": "36", "label": "36" }, { "value": "48", "label": "48" } ] }, { "type": "header", "content": "Blog results" }, { "type": "checkbox", "id": "blog_author", "label": "Show author" }, { "type": "checkbox", "id": "read_more_link", "label": "Show continue reading link for blog post excerpts", "default": true }, { "type": "checkbox", "id": "blog_date", "label": "Show date", "default": true }, { "type": "header", "content": "Sidebar" }, { "type": "paragraph", "content": "Create a sidebar by adding content blocks." }, { "type": "checkbox", "id": "toggle", "label": "Toggle sidebar content" } ], "blocks": [ { "type": "filter_by_collection", "name": "Collection list", "limit": 1 }, { "type": "filter_by_type", "name": "Type list", "limit": 1 }, { "type": "filter_by_vendor", "name": "Vendor list", "limit": 1 }, { "type": "menu", "name": "Menu", "settings": [ { "type": "link_list", "id": "custom_menu_linklist", "label": "Menu" } ] }, { "type": "text", "name": "Text", "settings": [ { "type": "text", "id": "title", "label": "Heading", "default": "Heading" }, { "type": "richtext", "id": "text", "label": "Text", "default": "

Text area can be used for special announcements or general information.

" } ] }, { "type": "page", "name": "Page", "settings": [ { "type": "page", "id": "content_page", "label": "Page" } ] } ] } {% endschema %}