# smootify-collection

> One collection read from Shopify by data-id (numeric or gid; it wins over the handle) or data-handle, for what the Webflow CMS does not carry (its metafields, of any type) or a page without a CMS collection. Fields through [collection="…"] (§2.17), its metafields through [collection-metafield] / [if-collection-metafield] / [unless-collection-metafield] (§2.8, namespace default custom, asked for in the collection's own query); a field inside another smootify-collection belongs to that one. A smootify-metaobjects[data-type="metafield.<ns>.<key>"] inside lists that collection metafield's entries. Once drawn: data-collection-id (the gid), class loaded, event loaded (detail.collection), [skeleton] cleared. In the page's market and language.

Status: Ready (Smootify 2.0)  
URL: https://www.smootify.io/docs/reference/elements/smootify-collection  
Updated: 2026-11-26

## Where it can go

- **Anywhere** on the page.
- **Out of place,** Smootify removes it from the page: without data-id and data-handle, when Shopify has no such collection, or the request fails.

## What it requires

Nothing beyond Smootify: it works on every plan.

## Attributes on the element

- **It reads** `data-id`, `data-handle`.
- **Smootify writes** `data-collection-id`, `loaded` on it: do not set them yourself.

## Attributes inside it

| Group | Attribute name | Values |
|---|---|---|
| [Image size](https://www.smootify.io/docs/reference/attributes/image-size) | `max-width` | 4 |
| [Collection](https://www.smootify.io/docs/reference/attributes/collection) | `collection` | 8 |
| [Collection metafield](https://www.smootify.io/docs/reference/attributes/collection-metafield) | `collection-metafield` | 8 |
| [Collection metafield (condition)](https://www.smootify.io/docs/reference/conditions/collection-metafield) | `if-collection-metafield` | 4 |

## Loading

Its code loads only on pages that have `smootify-collection`.
