Array template
Array template
Aşağıdaki alan düzeyi katalog tabloları İngilizce kalır — düzenleyici, API ve MCP’nin kullandığı makine tasarım şemasıyla birebir uyumludur.
List/repeater primitive: repeats its content slot once per item of an
arrayorentry[]variable (or array-like binding). SetarrayBindingto a whole-value token such as{{var:hits}},{{var:items}}, or{{bind:…}}. Inside the slot the current row is aliased asitem— use{{var:item.<fieldKey>}}(and nested paths). Forentry[]results, object field keys are flattened fromfieldValuesontoitemso tokens omit.fieldValues. OptionalcolumnsByBreakpoint(+ gaps) lays rows out as a CSS grid (each row is a grid item). Prefer columns on VAT rather than wrapping VAT in a single GridListBlock/GridBlock cell. For outer gaps/columns around the template, prefer FlexListBlock / GridListBlock. Row DOM ids are suffixed with-{index}. Child blocks can use shellhideWhenEmpty: "{{var:item.link}}"to skip empty fields. Prefercreate_component_presetkind=list. This is the ObjectDisplay list replacement — do not invent a list mega-block or copy ObjectBoundField onto pages.
Examples
Search hits list
{
"arrayBinding": "{{var:hits}}",
"content": [
{
"type": "HeadingBlock",
"props": {
"text": "{{var:item.title}}",
"fontSize": 24
}
}
]
}
Component input items
{
"arrayBinding": "{{var:items}}",
"content": [
{
"type": "HeadingBlock",
"props": {
"text": "{{var:item.name}}"
}
}
]
}
Fields
content
Template slot rendered once per array item. Tokens resolve in a scope where the current row is item ({{var:item.<fieldKey>}}). Empty arrays render nothing on the published site; the editor shows a single sample row.
content: [{ type: "HeadingBlock", props: { text: "{{var:item.title}}" } }]
arrayBinding
Whole-value {{var:id}} or {{bind:id}} selecting an array or entry[] source. Nested object arrays use {{var:parent.field}}. Partial/string interpolation is ignored — binding must be the entire token.
arrayBinding: "{{var:hits}}"
Default props
{
"arrayBinding": "",
"content": [],
"layout": {}
}