Skip to main content

collection / collections

Collection picker fields. Use collection for a single collection or collections for a list. Returns the collection object(s) without products.

Need products too?

If you need the collection with its products, use collection_products instead.

Properties

PropertyTypeRequiredDescription
type"collection" or "collections"YesSingle or multiple collections
labelstringYesLabel shown in the builder
defaultstring or arrayNo"" for collection, [] for collections

Usage

{
"primary": {
"type": "collection",
"label": "Collection",
"default": ""
},
"list": {
"type": "collections",
"label": "Collections",
"default": []
}
}

Interactive Preview

Interactive Preview
New Arrivals
12 products
Live Output
{
  "primary": {
    "_id": "691f38a8a60232b8a1049823",
    "title": "New Arrivals",
    "slug": "new-arrivals",
    "handle": "new-arrivals",
    "productCount": 12
  }
}