Advertisement
vladcrown111

Untitled

Mar 20th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.83 KB | None | 0 0
  1. {% assign collurl = collection.url %}
  2. {% if collection.handle == 'all' %}
  3. {% assign collurl = '/collections/all' %}
  4. {% endif %}
  5. {% unless collection.handle %}
  6. {% comment %} Title needs unescaping as it replaces html entities {% endcomment %}
  7. {% capture collurl %}/collections/vendors?q={{ collection.title | replace: "'", '%27' | replace: '&', '%26' | replace: ' ', '+' }}{% endcapture %}
  8. {% endunless %}
  9.  
  10. <div id="breadcrumbs">
  11. <span class="text">
  12. <a href="/" title="{{ 'general.breadcrumbs.home' | t }}">{{ 'general.breadcrumbs.home' | t }}</a>
  13. &raquo;
  14. <a href="{{ collurl }}">{{ collection.title }}</a>
  15. {% if current_tags and current_tags.size > 0 %}
  16. &raquo;
  17. {% for tag in current_tags %}
  18. {{ tag | link_to_tag: tag }}{% unless forloop.last %},{% endunless %}
  19. {% endfor %}
  20. {% endif %}
  21. </span>
  22. {% include 'sociallinks' with collection %}
  23. </div><!-- #breadcrumbs -->
  24.  
  25. {% paginate collection.products by section.settings.pagination %}
  26. <div id="content" data-quick-buy="{{ section.settings.enable_quick_buy }}">
  27. <h1>{{ collection.title }}</h1>
  28.  
  29. {% if collection.description != empty %}
  30. <div class="pagecontent simple">
  31. {{ collection.description }}
  32. </div>
  33. {% endif %}
  34.  
  35. {% if collection.all_tags.size > 0 and section.settings.collection_tags_enabled == true %}
  36. <div class="tags">
  37. <h3>{{ 'collections.filtering.filter' | t }} &raquo;</h3>
  38. <ul>
  39. {% if current_tags and current_tags.size > 0 %}
  40. <li><a href="{{ collurl }}">{{ 'collections.filtering.all' | t }}</a></li>
  41. {% else %}
  42. <li class="active"><a href="{{ collurl }}">{{ 'collections.filtering.all' | t }}</a></li>
  43. {% endif %}
  44.  
  45. {% for tag in collection.all_tags %}
  46. {% comment %}Don't show tags used for relating products together{% endcomment %}
  47. {% capture tagstart %}{{ tag | remove_first: 'related-' }}{% endcapture %}
  48. {% if tagstart == tag %}
  49. {% if current_tags contains tag %}
  50. <li class="active">{{ tag | highlight_active_tag | link_to_tag: tag }}</li>
  51. {% else %}
  52. <li>{{ tag | highlight_active_tag | link_to_tag: tag }}</li>
  53. {% endif %}
  54. {% endif %}
  55. {% endfor %}
  56. </ul>
  57. </div>
  58. {% endif %}
  59.  
  60. {% if collection.products.size == 0 %}
  61. <strong>{{ 'collections.general.no_matches' | t }}</strong>
  62. {% else %}
  63. <div class="productlist">
  64. {% for product in collection.products %}
  65. {% include 'product-list-item-4col' %}
  66. {% endfor %}
  67. </div><!-- .productlist -->
  68. {% if paginate.pages > 1 %}
  69. <div class="pagination">
  70. {{ paginate | default_pagination }}
  71. </div>
  72. {% endif %}
  73. {% endif %}
  74. </div><!-- #content -->
  75. {% endpaginate %}
  76.  
  77.  
  78. {% schema %}
  79. {
  80. "name": "Collection page",
  81. "settings": [
  82. {
  83. "type": "checkbox",
  84. "id": "collection_tags_enabled",
  85. "label": "Show tags on the collection page"
  86. },
  87. {
  88. "type": "select",
  89. "id": "pagination",
  90. "label": "Max number of products to show per page",
  91. "options": [
  92. {
  93. "value": "8",
  94. "label": "8"
  95. },
  96. {
  97. "value": "12",
  98. "label": "12"
  99. },
  100. {
  101. "value": "16",
  102. "label": "16"
  103. },
  104. {
  105. "value": "20",
  106. "label": "20"
  107. },
  108. {
  109. "value": "24",
  110. "label": "24"
  111. }
  112. ],
  113. "default": "12"
  114. }
  115. ]
  116. }
  117. {% endschema %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement