Deck Item Label
The deckItemLabel setting controls how deck items are labeled in the admin interface. It uses the same template syntax as the autogen setting (see ID Autogen documentation), but displays raw values without slugification.
Default: ${id} (displays the item’s ID)
Basic Usage
Section titled “Basic Usage”{ "deckItemLabel" : "${rating} - ${name}"}Supported Placeholders
Section titled “Supported Placeholders”- Field values:
${fieldName}- Any field from the deck item schema - Multiple fields:
${id} - ${title}- Combine multiple fields with separators - Dynamic values (new items only):
${oid}- Deck item count (1, 2, 3…)${oid-00000}- Zero-padded deck item count (00001, 00002…)${uid}- Random unique ID${uuid}- Full UUID${now}- Current timestamp${currentyear},${currentmonth},${currentday}- Date components
Examples
Section titled “Examples”Simple ID display:
"deckItemLabel": "${id}"Rating and name:
"deckItemLabel": "${rating} ★ - ${name}"Sequential numbering:
"deckItemLabel": "Item ${oid}: ${title}"Zero-padded numbers:
"deckItemLabel": "Review ${oid-00000}"Result: “Review 00001”, “Review 00002”, etc.
Important Notes
Section titled “Important Notes”- No slugification: Values are displayed as-is without URL-safe transformation. If a field contains “The Big Red Fox”, the label will show exactly that.
- Twig compatibility: Deck item IDs are automatically sanitized to use underscores instead of hyphens for Twig dot notation access (
mydeck.item_id). - SVG support: If a field contains SVG code, it will be displayed as a small icon in the label.
- Long text: Labels automatically truncate with ellipsis (…) if content is too long.
Min/Max Item Count
Section titled “Min/Max Item Count”The minItems and maxItems settings control how many items a deck field can contain.
| Setting | Default | Description |
|---|---|---|
minItems | 0 | Minimum number of items required. Validated on form submission. |
maxItems | -1 | Maximum number of items allowed. -1 means unlimited. When reached, the add and duplicate buttons are disabled. |
Basic Usage
Section titled “Basic Usage”{ "minItems": 1, "maxItems": 5}Examples
Section titled “Examples”Require at least one item:
"minItems": 1Validation will fail with “Please add at least 1 items” if the deck is empty on submit.
Limit to a maximum of 3 items:
"maxItems": 3The add and duplicate buttons will be disabled once 3 items exist. Removing an item re-enables them.
Exact count (e.g., exactly 3 items):
{ "minItems": 3, "maxItems": 3}