locomotivecms / engine

A platform to create, publish and edit sites
http://www.locomotivecms.com
Other
2.32k stars 622 forks source link

For Sections, Allow section blocks within blocks for Sections #1343

Open westonganger opened 5 years ago

westonganger commented 5 years ago

For section blocks it would be cool to be able to define blocks within blocks.

IE.

westonganger commented 5 years ago

For example Table -> Row -> Cell

did commented 5 years ago

@westonganger that's a very interesting suggestion. What I know is that I/we don't want a block to have blocks because it will make the editor UI super complicated. I guarantee you that our clients will be lost :-)

That being said, it'd be pretty neat to support tables or even nested menu items for instance (this can implemented currently with different types of blocks, works well).

Regarding the nested menu items example, I was thinking about adding a new section property called blocks_presentation. When blocks_presentation is set to tree, the editor would display blocks under a tree structure (drag&drop, collapse/show all nodes, ...etc). And each block will have a parent. So, the question is to know if we could display a table with the tree presentation.

What do you think?

westonganger commented 5 years ago

So, the question is to know if we could display a table with the tree presentation.

For example Table -> Row -> Cell

How would you prevent the user from placing a table cell where a table row is supposed to be.

did commented 5 years ago

that's a right concern. Hmm, I'm thinking about the initial problem. As a designer, you know what content your clients are going to put in the table and you're not going to let your clients modify the number of columns. You don't want them to break the layout. So my point is that they only need to change the label of the table headers and add/update/remove rows. What do you think?

westonganger commented 5 years ago

Actually I was designing something where they could choose the number of items per row.