Frameless modular block: option to promote sub-fields

Let’s say I have:

  • A model with a field body, and I set this to a modular block (single) in frameless mode, accepting only the body_text block.
  • The body_text block has fields text and style.

When I retrieve the value of the body field, I will get something like body.body_text.text and body.body_text.style. In other words I need to remember that I set up the body field as a frameless block, and I need to remember to access its sub-fields through the body_text key.

It would be useful to have a switch in frameless mode also to promote the sub-fields of the block to be keys on the parent field, so I can do body.text and body.style to access the sub-fields of the block.

I find this more intuitive, and it would allow me to more freely nest blocks in frameless mode without closely keeping track of where I’ve done that.

I agree, having the subfields promoted to the parent would make things easier and more intuitive. It would also keep nesting a lot cleaner.

I believe this is already in place. Here’s a screenshot of my Modular Content field, which includes one required block and Frameless, along with an example request for the CDA.

1 Like