Overview:
A little bit of history...
Why do you have yet another property editor to consider when building out an Umbraco project? At the Codegarden Community Retreat in 2019, it was agreed that there is a need to standardise the way complex content is handled in Umbraco. Over the years there have been many examples of complex editors, both community packages and in Umbraco CMS: The Grid Layout editor, Nested Content, Stacked Content, Archetype, Bento and many more. These are all property editors that enable developers to provide simple and intuitive workflows for content editors while being highly configurable and customisable.
Many of the above examples have their own way of storing data, handling configuration and meta data and specific ways to render content.
Wouldn’t it be great if they were all built on the same foundation?
I think the answer here is obviously YES!
This lowers the point of entry for developers, as it will be a common, best-practice concept and makes it easier to collaborate/contribute to property editors.
In Umbraco 8, element types were added as the standard way to store the types used for complex editors. This means there is a clear differentiation between Document Types (the model for content nodes) and Element Types (the model for items used in property editors such as Nested Content).
In Umbraco 8.7 we’re extending this concept to handle storing the data in a standardised way, adding proper validation for Element Types and providing the foundation for future property editors.
The work at the retreat resulted in two Request for Comments (RFC). The first one for the underlying concept and data structure (RFC for Block Data Structure) and the second one for a new property editor based on the concept (RFC for Block Editor).
The concept of Block editors
The underlying foundation is called Block editors. A Block editor uses a specific data structure based on Element Types and has an API to create Property Editors and a number of helpful features that should make it easier to work with and, very importantly, document how to do this.
This article focuses on the Block List editor but if you are interested in creating your own Block editor you can find the documentation here.
The Block List Editor
The Block List Property Editor is basically a list of inner documents or blocks of content within a content node.
If you are at all familiar with Nested Content, you should be right at home as the default set up is very similar to that.
With the Block List editor you, as a developer, have a lot of control over how the blocks are displayed, edited and validated. You will also find the entire workflow for creating and updating blocks and types related to the Block List editor is intuitive and easier to work with.
So, what does it do?
The best way to run through the built-in features of the Block List editor is to have a look at how it is configured. In some ways, it’s similar to other property editors but there are some new workflows and features. They are there to make life as an Umbraco developer easier and help you craft a good editing experience.
Data Type configuration
When you want to use the Block List editor, you start by adding it to a property. This creates a new data type that is configuration for this Block List editor. The data type configuration looks like this: