Repeatable Template Block
A block like Repeatable Fields Block, but it supports selecting predefined templates. Good for dynamic page layouts (e.g. flexible combination of a series of sections).
Settings
Basic
Name
: The human-friendly name of this field.Data Key
: The field name in published data. It must be in UpperCamelCase.Description
: The description of this field, should be a human-friendly text shown for content editor.Hidden
: Hide this field from the template. Used to create document with hidden default values. It is recommended that put this field to bottom.
Options
Template
: The templates for this template block.
Publish
Data Key
is set as content
. Template Project
has two fields title
, description
. Template Client
has two fields name
, title
.
JSON data
The value of this field will be published as a object array
.
{
"content": [
{
"_type": "Project",
"title": "contentboot",
"description": "a headless CMS"
},
{
"_type": "Client",
"name": "Tom",
"title": "dev"
},
{
"_type": "Client",
"name": "Jerry",
"title": "test"
}
]
}
GraphQL API
The value of this field will be published as a object array
.
{
"content": [
{
"_type": "Project",
"title": "contentboot",
"description": "a headless CMS"
},
{
"_type": "Client",
"name": "Tom",
"title": "dev"
},
{
"_type": "Client",
"name": "Jerry",
"title": "test"
}
]
}