Product Update

Expanding Modular Content with Single Block and Frameless Mode

Posted on January 24th, 2024 by Alessio Pinto

Today we’re pulling back the curtain on a new feature we're particularly proud of — say hello to the Single Block option for Modular Content, and its nifty companion, the Frameless display mode.

Let’s dive into this goodness and discover why we believe it’s quite a big deal.

Less overhead for Editors and Developers

When adding a Modular Content field in a model, you now have the option to create a Single Block variant. This comes very handy when you want editors to be able to use only one block in a Modular Content. You can also choose to allow any number of block types, or force editors to use a specific one.

This not only saves time and reduces potential mistakes for editors, but also simplifies your frontend. In the past, having only one block in a Modular Content field would mean retrieving an array that would always contain that one block. The new Single Block variant finally puts an end to all the pointless [0] occurrences in your frontend code.

Share fields across models with Frameless mode

Selecting "Frameless" in the Presentation tab of a Single Block will remove the Modular Content frame in the records, so that the block's fields will look and feel as regular fields, lightening the editor experience by removing the unnecessary clutter of the Modular Content UI.

But where this feature really shines is when you want to share sets of fields across different models - which has been one of the most requested features from our Community!

Using Frameless mode eliminates the hassle of duplicating fields, or keeping those fields in sync manually, with all the headaches and errors that might imply.

How to use Frameless mode

For example, say that you're using DatoCMS to manage a PR agency website. You've got models for Partners, Office Locations, and Press Contacts. While each needs specific attributes, there's a common thread - an "Address" section - that you want to be consistent across the board.

In the past, you would need to create the same fields in all models, and every time you needed to modify those fields, you would have to recall which models had an address, go through them once again and apply the same changes.

Have a look at this walkthrough to see how the Frameless mode comes to the rescue in this scenario.

You can add a new requirement, or a validation, or even a new field in the "Address" Single Block once, and like a wave the changes will ripple through every model automatically.

Want to get into the details of how Frameless mode works? Get a full feature rundown in our docs.

Transition from Single block to Multiple blocks

When working with Modular Content fields, you can convert a Single Block variant to a Multiple Blocks variants (or the other way around) anytime you want.

But remember, if you decide to trim down from multiple to a single block, only the first block will be retained — the rest will be gone. This change is permanent, so take it for a test drive in a sandbox environment first to avoid roadblocks.

Wrapping It Up

Just like other recent updates, such as the new Schema interface and Deep Filtering for Modular Content and Structured Text, the Single Block and its Frameless mode are about making your content modeling operations as smooth and delightful as possible. We’re not interested in adding bells and whistles - we’re building a smarter DatoCMS for you.

As always, your feedback is the magic ingredient that helps us keep improving. So, jump into these updates, try them out, and don’t be shy: head over to our Community and share your experiences and ideas.

Until next time, happy modeling! 🚀🛠️