Content Modeling
Repeatable sections your client can reorder
A deck is a list of named items on one object — slides, pricing tiers, FAQs, spec rows. You define the shape of one item once; the editor adds, duplicates and reorders as many as the page needs.
Pro
Decks are a Pro feature. A deck is a repeatable section: one object holds many items of the same shape — slides in a hero, tiers on a pricing table, rows of technical specs, a list of questions and answers. You define what a single item looks like, and the editor adds as many as the page calls for.
That shape comes from a second schema, referenced from the deck property with schemaref. The item schema is an ordinary Total CMS schema with its own properties and its own field types, so one shape can back decks on more than one collection. In the admin each item opens in a modal sized small, medium or large. Set deckTable as the field instead of deck and the same data edits as a table, which suits rows of short, uniform values.
On disk a deck is a dictionary of named items, never an array. Each key names one item and that key is also the item's id. That is what makes an item addressable by name in a template — object.myDeck.first_item.name — rather than by a position that moves the first time somebody reorders the list. Keys may contain letters, numbers and underscores only, and the admin converts hyphens to underscores as you type.
Two settings keep an editor inside the design. minItems fails validation when the deck is too empty, and maxItems disables the add and duplicate buttons once the limit is reached — the default of -1 means unlimited. deckItemLabel decides what each row is called in the admin, built from the item's own values with placeholders such as ${rating} and ${name}, including values nested one level down inside a card.
A worked case: a pricing page with three plans. One plan item schema — name, price, a list of features, a highlight toggle — and a deck on the pricing object with minItems and maxItems both set to three. The template loops the deck and prints a column per item. The client edits prices and bullets without touching a template, and cannot publish a fourth column by accident.
Cards are the single-instance version of the same idea: one nested object rather than a list, rendered as inline sub-fields. Cards nest inside deck items — decks inside cards are not — and image and file fields work at either level.
What you get
Shaped by a schema
A deck points at a second schema with schemaref. That item schema defines the fields, and the same shape can back decks on more than one collection.
Named items, not positions
Each item is stored under its own key, and that key is the item's id. Templates reach a specific item by name instead of by index.
Limits the editor respects
minItems is validated on submit. maxItems disables the add and duplicate buttons once the deck is full, and re-enables them when an item is removed.
Readable rows in the admin
deckItemLabel builds each row's label from the item's own values, including a single locale or a sub-field inside a card.
Table mode
Switch the field to deckTable and the same data edits as a table — a better fit for rows of short, uniform values.
In practice
One snippet
{% for item in object.myDeck %}
{{ item.name }}
{% endfor %}
{{ object.myDeck.first_item.name }}
Loop a deck in order, or address one item directly by its key.
FAQ
Common questions
What is the difference between a deck and a card?
A card is a single-instance deck. It stores exactly one nested object and renders as inline sub-fields with no add, remove or duplicate buttons. Use a card for one named grouping and a deck for a list of them.
Can I nest a deck inside a card?
No. Cards inside deck items are supported; decks inside cards are not. Image and file fields work at either level.
Which edition includes decks?
Decks and cards are included in Pro.
Can I write deck data by hand?
Yes, through a JumpStart file, the API or an import. Three rules apply: the deck must be a dictionary rather than an array, each item's id must match its key, and keys may use only letters, numbers and underscores.
Related features
- Custom schemas Define your own object shapes as JSON files. The admin form, the list view, validation and the query surface are all generated from the schema.
- 36+ admin field types Rich text, dates, prices, colors, selects, lists, images, video, cards and decks — each with the right editor, the right storage shape and the right filters.
- 20+ built-in content types Blog, image, gallery, file, depot, text, number, date, toggle, color, url, email, svg and feed schemas ship built in. Bind one to a collection and edit.
Want the details? Read the Decks documentation →
Or keep browsing: every Total CMS feature →
Start Your Free 45-Day Trial