locomotivecms / engine

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

Add ability to group/namespace dropzone sections #1318

Open westonganger opened 5 years ago

westonganger commented 5 years ago

It would be nice to be able to group/namespace dropzone sections. For example:

Proposed syntax:

{% sections_dropzone group: 'page_1' %}

or

{% sections_dropzone 'page_1' %}

did commented 5 years ago

I see! Good one. You mean whitelisting (or blacklisting) sections for a dropzone. why not this syntax

{% sections_dropzone whitelist: 'hero,carousel,footer' %}

Thus we know exactly in the template which sections are allowed. Passing a group will force you to go through to all the sections.

What do you think about it?

westonganger commented 5 years ago

whitelist/blacklist would be fine. However listing individual sections will get way too lengthy. Can we add a key to the section definition called group and we can define whitelist_groups/blacklist_groups