Within a Layout Field that only allows to insert image blocks, I am trying to restrict the possibility to add image blocks to max: 1
within a layout column like it is possible with an image block in the blocks field. But until now it’s not working. Is there no max
or min
for blocks within layouts?
The Layout-Feld:
gallery:
type: fields
fields:
gallery:
type: layout
label: Layout Gallery
layouts:
- "1/1"
- "1/2, 1/2"
- "1/3, 1/3, 1/3"
- "1/3, 2/3"
- "2/3, 1/3"
- "1/4, 1/4, 1/4, 1/4"
max: 1
fieldsets:
image:
extends: blocks/image
fields:
image:
multiple: false
uploads:
template: image
Equivalent Blocks Field (working):
block-image:
type: blocks
label: Block Image
max: 1
fieldsets:
image:
extends: blocks/image
fieldsets:
image:
multiple: false
uploads:
template: image