Blocks are very similar to structure field and limits are useful. For example you want to use them for “slot”. Or if i have two colum layout i want people to be able to add only single block to each colum (image and text).
Not sure if min/max on layout would make sense and it would probably get pretty complicated.
This would be super help, when you have complex layout grids that can be broken by the client clicking the wrong add button
I see multiple case where it would be useful…!
@iskrisis I know I am late to the party, but what exactly would min/max refer to on the layout field. The number of blocks overall? The number of blocks in eahc column? Any way to specify different min/max for different columns?
@Nico Yes, number of blocks of column. You can check out my comment related feature that included this limit prop: https://kirby.nolt.io/297
For a client of mine, I used the layout field to allow them to build a custom header layout. I’ve “hacked” a limit together with CSS, but drag-and-drop would still work. In this case, the layout would break (third image) if you add more than 1 block in each column. Having a limit option would allow a more versatile use of the layout block for cases like this.