This key represents an array of preview entries for displaying data on Cards in the Collection browser, Structures, and Snippets.
The value is an array of preview entry objects, strings, or false values. Each preview entry object can contain a key, template, or text property. When multiple entries are provided, CloudCannon will use them in order as fallback options.
Appears in
├── Text Input
│ └── options
│ ├── icon_color
│ │ └── Array Preview Entry
│ └── icon_background_color
│ └── Array Preview Entry
├── text
│ └── Array Preview Entry
├── subtext
│ └── Array Preview Entry
├── image
│ └── Array Preview Entry
├── icon
│ └── Array Preview Entry
├── icon_color
│ └── Array Preview Entry
├── icon_background_color
│ └── Array Preview Entry
└── background_color
└── Array Preview EntryType
Array<Preview Entry>
Items
preview-entry — Key Preview Entry|Template Preview Entry|Text Preview Entry|Raw Text Preview Entry|False Preview Entry#This key defines a preview entry configuration for displaying data on Cards in the Collection browser, Structures, and Snippets.
The value can be an object with a key, template, or text property, a raw text string, false, or an array of these values. When multiple entries are provided, CloudCannon will use them in order as fallback options. Preview entries are used to configure how data is displayed in card previews.
Appears in: Array Preview Entry.
Show examplesHide examples
In this example, we have configured a preview entry with an array of values to provide fallback options. CloudCannon will use the value of title first, then the {name} template, and finally fall back to the static text value.
collections_config:
blog:
preview:
text:
- key: title
- template: '{name}'
- text: Untitled{
"collections_config": {
"blog": {
"preview": {
"text": [
{
"key": "title"
},
{
"template": "{name}"
},
{
"text": "Untitled"
}
]
}
}
}
}In this example, we have configured a preview entry to display the title key.
collections_config:
blog:
preview:
text:
- key: title{
"collections_config": {
"blog": {
"preview": {
"text": [
{
"key": "title"
}
]
}
}
}
}Examples
In this example, we have configured an array of preview entries with an array of values to provide fallback options. CloudCannon will use the value of title first, then the {name} template, and finally fall back to the static text value.
collections_config:
blog:
preview:
text:
- key: title
- template: '{name}'
- text: Untitled{
"collections_config": {
"blog": {
"preview": {
"text": [
{
"key": "title"
},
{
"template": "{name}"
},
{
"text": "Untitled"
}
]
}
}
}
}