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.
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,loadedon it: do not set them yourself.
Attributes inside it
| Group | Attribute name | Values |
|---|---|---|
| Image size | max-width | 4 |
| Collection | collection | 8 |
| Collection metafield | collection-metafield | 8 |
| Collection metafield (condition) | if-collection-metafield | 4 |
Loading
Its code loads only on pages that have smootify-collection.