Possibility to limit the layout field to one block

,

Hi;
I’ve read it’s not possible to limit the layout field to 1 block.
Is there any hack, or css hach possible that I didn’t thought about?

I thought about adding borders to my columns. Or hiding the drag cursor.


.k-layout:not(:last-of-type) {
    margin-bottom: 2em;
}

.k-layout-column:has(.k-block-container:nth-child(2)) .k-block-container:nth-of-type(2)::before {
    content: "Please move that element to another column";
    position: absolute;
    background-color: rgb(240, 118, 69);
    padding: 1em;
    border-radius: 5px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 1;

}

Also, is this an option coming to v5?

Thanks.

I don’t think so. What’s the use case? I mean, if anything, the limitation would have to be by column, so in a 4-column layout, the number would have to be 4, but then each block in a separate column. The logic to set up something like that and keep track of it would get insanely complex, I think.

Might make more sense to have a custom block with columns in that case?

Instead of limiting by column, why not by rows?
You could limit the item to 1 row, or 2 rows, for example.

Hm, not sure I understand. The purpose of the layout field is the option to have multiple columns. So how can I limit this by row, say I have 3 columns, and limit to 6 blocks, that could be two per column, but also 1-2-3.

The way I’m using the layout block in that specific case, is to let the user create a custom grid of pictures.
The idea is for them to use a layout with either 2, 4, or 6 columns. They can add picture in any of these modules of 2, 4 or 6 columns, but the design rule is to never use the same column twice in the panel. Each picture require a new column layout.

This is a request here too:

In the absence of such a layout field feature, I’d solve this with custom blocks instead of layouts.