{% paginate collection.products by settings.collection-products-per-page %} {% assign platforms = 0 %} {% if settings.share-widget-facebook %}{% assign platforms = platforms | plus: 1 %}{% endif %} {% if settings.share-widget-twitter %}{% assign platforms = platforms | plus: 1 %}{% endif %} {% if settings.share-widget-pinterest %}{% assign platforms = platforms | plus: 1 %}{% endif %} {% if settings.share-widget-fancy %}{% assign platforms = platforms | plus: 1 %}{% endif %} {% if settings.share-widget-google-plus %}{% assign platforms = platforms | plus: 1 %}{% endif %} {% if settings.share-widget-email %}{% assign platforms = platforms | plus: 1 %}{% endif %} {% if platforms > 0 %}
{{ 'general.share_buttons.share' | t }} {% include 'share-buttons' %}
{% endif %} {% if settings.collection-sorting or settings.collection-filtering %}
{% if settings.collection-sorting %}
{% assign sortHandles = "manual|price-ascending|price-descending|title-ascending|title-descending|created-ascending|created-descending|best-selling" | split: "|" %} {% capture sortTitles %}{{ 'collections.collection_sorting.manual' | t }}|{{ 'collections.collection_sorting.price-ascending' | t }}|{{ 'collections.collection_sorting.price-descending' | t }}|{{ 'collections.collection_sorting.title-ascending' | t }}|{{ 'collections.collection_sorting.title-descending' | t }}|{{ 'collections.collection_sorting.created-ascending' | t }}|{{ 'collections.collection_sorting.created-descending' | t }}|{{ 'collections.collection_sorting.best-selling' | t }}{% endcapture %} {% assign sortTitles = sortTitles | split: "|" %} {% for handle in sortHandles %} {% if collection.sort_by == blank and collection.default_sort_by == handle %} {% assign currentTitle = sortTitles[forloop.index0] %} {% elsif collection.sort_by == handle %} {% assign currentTitle = sortTitles[forloop.index0] %} {% endif %} {% endfor %}
{% endif %} {% if collection.handle != blank and settings.collection-filtering %}
{% assign tagLinkLists = "collection-filter-link-list-1|collection-filter-link-list-2|collection-filter-link-list-3" | split: "|" %} {% assign availableLinks = false %} {% for list in tagLinkLists %} {% assign name = settings[list] %} {% if linklists[name].links.size > 0 %} {% assign availableLinks = true %}
{% endif %} {% endfor %} {% if availableLinks == false and collection.all_tags.size > 0 %} {% comment %} There were no links found in any of the link lists {% endcomment %}
{% endif %}
{% if current_tags.size > 0 %} {{ 'collections.collection.reset_tags' | t }} {% endif %} {% endif %}
{% endif %}
{% for product in collection.products %} {% include 'product-list-item' %} {% else %}

{{ 'collections.collection.empty' | t }} {% if current_tags.size > 0 %}{{ 'collections.collection.empty_tag_filter' | t }}{% endif %}

{% endfor %}
{% include 'pagination' %} {% endpaginate %}