collections
collections enumerates published storefront collections and resolves a
collection directly by handle.
{% assign summer = collections['summer'] %}{% for collection in collections %} <a href="{{ collection.url }}">{{ collection.title }}</a>{% endfor %}Direct lookup is limited to 20 unique handles per object and is memoized.
Enumeration uses the storefront collection list and doesn’t consume that
lookup budget. The synthetic all-products collection is available as
collections['all'], but is not inserted into enumeration.
Properties
| Property | Description |
|---|---|
collections.first | Buyer-visible first value for this collections. |
collections.last | Buyer-visible last value for this collections. |
collections.length | Buyer-visible length value for this collections. |
collections.size | Buyer-visible size value for this collections. |
Property list is generated from the storefront engine (CollectionsDrop), so it always matches what your theme can use. Use {{ collections | json }} only as a curated debug snapshot; it can omit lazy or otherwise public properties.