- Getting Started
- Liquid reference
- Filters reference
- Tags reference
- Localization
- Theme structure
- Theme sections
- Theme assets
- Theme config
- Theme layout
- Theme templates
-
- article.liquid
- blog.liquid
- cart.liquid
- collection.liquid
- customer/account.liquid
- customer/addresses.liquid
- customer/details.liquid
- customer/login.liquid
- customer/order.liquid
- customer/register.liquid
- customer/reset-password.liquid
- home.liquid
- page.no-heading.liquid
- products.liquid
- search.liquid
- list-collections.liquid
- store-locator.liquid
- 404.liquid
- customer/activate_account.liquid
- customer/orders.liquid
- Submission
list-collections.liquid
The list-collections.liquid template renders the index of all collections in the shop. It is loaded when a visitor goes to the /collections URL.
Use the global collections array to loop through every collection in the shop and output a link to each one. It is common to skip the frontpage collection, which is reserved for the homepage.
{% for collection in collections %}
{% unless collection.handle == 'frontpage' %}
<a href="{{ collection.url }}">
{{ collection.title }}
</a>
{% endunless %}
{% endfor %}
collection
Each item returned by the loop is a collection object, which exposes attributes such as collection.title, collection.url, collection.image and collection.products. More info ›