Posts Shopify subcollection
Post
Cancel

Shopify subcollection

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<div class="page-width custom-subcollections text-center">
{% for link in linklists[settings.structure].links %}
<h1 class="collection-title">{{link.title}}</h1>
<hr>
<div class="grid">
 {% for childlink in link.links %}
	<div class="grid__item medium-up--one-third text-center">
    	<div class="item-wrapper">
  {% case childlink.type %}
  	
  	{% when 'collection_link' %}
  		{% assign this_collection = childlink.object %}
          <a href="{{this_collection.url}}">
        	<img src="{{this_collection.image | img_url: '300x300'}}" alt="{{this_collection.image.alt}}"/>
          	<h3>{{this_collection.title}}</h3>
          </a>
      	
  	{% when 'product_link' %}
  		{% assign this_product = childlink.object %}
           <a href="{{this_product.url}}">
        	<img src="{{this_product.images[0] | img_url: '300x300'}}" alt="{{this_product.images[0].alt}}"/>
          	<h3>{{this_product.title}}</h3>
          </a>
  {% endcase %}
		</div>
 	</div>
 {% endfor %}
</div>
{% endfor %}
</div>
Trending Tags

Trending Tags