Partners

Product Updates

DatoCMS changelog for new features and general improvements
NewContent Management APIContent Delivery API
Introducing Modular Content (Single Block)
January 23rd, 2024

We're thrilled to reveal a major upgrade to DatoCMS's schema modeling capabilities: the Single Block variant of our Modular Content, along with its Frameless display mode.

Simplified data fetching

With the Single Block variant of the Modular Content field, authors can easily insert a single block within a field.

At the same time, developers can finally retrieve just one block, rather than an array that would always contain that one block. This eliminates unnecessary complexity and clutter in your content structure, and puts an end to all the pointless [0] occurrences in your frontend code.

Reuse fields across models with "Frameless" mode

The Frameless display mode takes the Single Block variant one step further by allowing the reuse of schema between models, which is one of the most requested features in our Community.

Activating this mode hides the Modular Content field from the authoring interface, causing the inner block's fields to appear as though they are an integral part of the model.

This approach not only provides a more straightforward experience for authors but also offers an efficient solution for reusing common fields across different models without duplicating or manually synchronizing them.

A small caveat: in order to use the Frameless presentation, you will need to have only one allowed block, plus mark the field as required. If either of these conditions is not met, the block will fall back to the default "Framed block" view.

Discover more about this new feature in our docs.

Switching from single to multiple

You can also convert an existing Modular Content field from a single block to multiple blocks at any time, or vice versa.

Note that if you transition from multiple blocks to a single block, only the first block will be preserved, and the rest will be discarded. This change is irreversible, so we recommend testing it in a sandbox environment before implementation.