Skip to main content
Glama
collections.md1.07 kB
# Collections ## Description A global Liquid object that provides access to all product collections available on a store. ## Availability - **Global scope**: Accessible from any template ## Usage ### Iterate Over All Collections Loop through collections to generate a collection listing: ```liquid {% for collection in collections %} {{- collection.title | link_to: collection.url }} {% endfor %} ``` This produces links to each collection on the store. ### Access a Specific Collection by Handle Reference a particular collection using its handle: ```liquid {% for product in collections['sale-potions'].products %} {{- product.title | link_to: product.url }} {% endfor %} ``` This iterates through products within the specified collection. ## Related Objects - **[collection](/docs/api/liquid/objects/collection)**: Individual collection object with properties like `title`, `url`, and `products` ## Notes Collection handles are used as keys to access specific collections. Products within a collection are accessible via the `products` property.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/florinel-chis/shopify-liquid-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server