Nested / Composable Models?

I would like to create a model, and then use that in another model, which would be nesting a model in another model, or composing larger models out of smaller models…is that possible?

For example, I want to create a page hero block/section/component and then re-use that model inside of each single instance page component.

Is this something that is possible to do in Dato?

Sure, take a look at the modular content field.

1 Like

Do you have a link to a doc about the modular content field?

Nevermind, I found it. This is not quite what I’m looking for, I think.

I want to be able to create a content component, and then reuse it across multiple repeated and/or single-instance page models.

For example:

  1. I want to create a ‘Title Card’ model, which consists of a title, subtitle, and an image.
  2. I then want to create a new single-instance page or repeated model, and when I start adding fields to my model I want to be able to see my ‘Title Card’ model as a field type in the field pop-up modal, then select it to be used in that page.
  3. I want to then be able to create as many single-instance pages or repeated data models as possible and include the ‘Title Card’ model as a field in each page/model.
  4. If I make any changes to the original ‘Title Card’ field then all instances of that title card field across any models, either repeated or single instance, will be updated to reflect the new changes.

it doesn’t seem to be how the modular content field works, unless i am mistaken?

@rchrdnsh for your use case I would look into the link field:

If you link one model into another you get exactly the use case you are looking for. And you can add a link inside a modular content to have a repeater field. Does that help?