Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% assign collurl = collection.url %}
- {% if collection.handle == 'all' %}
- {% assign collurl = '/collections/all' %}
- {% endif %}
- {% unless collection.handle %}
- {% comment %} Title needs unescaping as it replaces html entities {% endcomment %}
- {% capture collurl %}/collections/vendors?q={{ collection.title | replace: "'", '%27' | replace: '&', '%26' | replace: ' ', '+' }}{% endcapture %}
- {% endunless %}
- <div id="breadcrumbs">
- <span class="text">
- <a href="/" title="{{ 'general.breadcrumbs.home' | t }}">{{ 'general.breadcrumbs.home' | t }}</a>
- »
- <a href="{{ collurl }}">{{ collection.title }}</a>
- {% if current_tags and current_tags.size > 0 %}
- »
- {% for tag in current_tags %}
- {{ tag | link_to_tag: tag }}{% unless forloop.last %},{% endunless %}
- {% endfor %}
- {% endif %}
- </span>
- {% include 'sociallinks' with collection %}
- </div><!-- #breadcrumbs -->
- {% paginate collection.products by section.settings.pagination %}
- <div id="content" data-quick-buy="{{ section.settings.enable_quick_buy }}">
- <h1>{{ collection.title }}</h1>
- {% if collection.description != empty %}
- <div class="pagecontent simple">
- {{ collection.description }}
- </div>
- {% endif %}
- {% if collection.all_tags.size > 0 and section.settings.collection_tags_enabled == true %}
- <div class="tags">
- <h3>{{ 'collections.filtering.filter' | t }} »</h3>
- <ul>
- {% if current_tags and current_tags.size > 0 %}
- <li><a href="{{ collurl }}">{{ 'collections.filtering.all' | t }}</a></li>
- {% else %}
- <li class="active"><a href="{{ collurl }}">{{ 'collections.filtering.all' | t }}</a></li>
- {% endif %}
- {% for tag in collection.all_tags %}
- {% comment %}Don't show tags used for relating products together{% endcomment %}
- {% capture tagstart %}{{ tag | remove_first: 'related-' }}{% endcapture %}
- {% if tagstart == tag %}
- {% if current_tags contains tag %}
- <li class="active">{{ tag | highlight_active_tag | link_to_tag: tag }}</li>
- {% else %}
- <li>{{ tag | highlight_active_tag | link_to_tag: tag }}</li>
- {% endif %}
- {% endif %}
- {% endfor %}
- </ul>
- </div>
- {% endif %}
- {% if collection.products.size == 0 %}
- <strong>{{ 'collections.general.no_matches' | t }}</strong>
- {% else %}
- <div class="productlist">
- {% for product in collection.products %}
- {% include 'product-list-item-4col' %}
- {% endfor %}
- </div><!-- .productlist -->
- {% if paginate.pages > 1 %}
- <div class="pagination">
- {{ paginate | default_pagination }}
- </div>
- {% endif %}
- {% endif %}
- </div><!-- #content -->
- {% endpaginate %}
- {% schema %}
- {
- "name": "Collection page",
- "settings": [
- {
- "type": "checkbox",
- "id": "collection_tags_enabled",
- "label": "Show tags on the collection page"
- },
- {
- "type": "select",
- "id": "pagination",
- "label": "Max number of products to show per page",
- "options": [
- {
- "value": "8",
- "label": "8"
- },
- {
- "value": "12",
- "label": "12"
- },
- {
- "value": "16",
- "label": "16"
- },
- {
- "value": "20",
- "label": "20"
- },
- {
- "value": "24",
- "label": "24"
- }
- ],
- "default": "12"
- }
- ]
- }
- {% endschema %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement