collections

All of the collections in a store.

Iterate over the collections

You can iterate over collections to build a collection list.

{% for collection in collections %}
  {{ collection.title | link_to: collection.url }}
{% endfor %}
<a href="/collections/all-collections">All Collections</a>
<a href="/collections/collection-2">Collection - 2</a>
<a href="/collections/new-boy">New Boy</a>

Access a specific collection

You can use collections to access a collection by its id.

{% assign collection = collections[collection.id] %}

{% for product in collection.products %}
  {{ product.title | link_to: product.url }}
{% endfor %}
<a href="/products/ace-cashmere-beanie">Ace Cashmere Beanie</a>
<a href="/products/haldon-cashmere-crew">Haldon Cashmere Crew</a>
<a href="/products/lace-up-leather-manston-runner">Lace-up Leather Manston Runner</a>