Creating Content Fragment Models Headless Quick Start Guide creating-content-fragment-models

Define the structure of the content that you create and serve using Adobe Experience Manager’s (AEM) headless capabilities by using Content Fragment Models.

What are Content Fragment Models? what-are-content-fragment-models

Now that you have created a configuration, you can use it to create Content Fragment Models.

Content Fragment Models define the structure of the data and content that you create and manage in AEM. They serve as a kind of scaffolding for your content. When choosing to create content, your authors select from the Content Fragment Models you define, which guides them in creating content.

How to Create a Content Fragment Model how-to-create-a-content-fragment-model

An information architect would perform these tasks only sporadically as new models are required. For the purposes of this getting started guide, you are creating only one model.

  1. Log into AEM and from the main menu select Tools > Assets > Content Fragment Models.

  2. Click the folder that was made by creating your configuration.

    The models folder

  3. Click Create.

  4. Provide a Model Title, Tags, and Description. You can also select/deselect Enable model to control whether the model is immediately enabled upon creation.

    Create a model

  5. In the confirmation window, click Open to configure your model.

    Confirmation window

  6. Using the Content Fragment Model Editor, build your Content Fragment Model by dragging and dropping fields from the Data Types column.

    Drag and drop fields

  7. Once you place a field, you must configure its properties. The editor automatically switches to the Properties tab for the added field where you can provide the mandatory fields.

    Configure properties

  8. When you are finished building your model, click Save.

  9. The mode of the newly created model depends on whether you selected Enable Model when creating the model:

    • selected - the new model is already Enabled
    • not selected - the new model is created in Draft mode
  10. If not already enabled, the model must be Enabled to use it.

    1. Select the model that you created, and then click Enable.

      Enabling the model

    2. Confirm enabling the model by tapping or clicking Enable in the confirmation dialog.

      Enabling confirmation dialog

  11. The model is now enabled and ready to use.

    Model enabled

The Content Fragment Model Editor supports many different data types such as simple text fields, asset references, references to other models, and JSON data.

You can create multiple models. Models can reference other content fragments. Use configurations to organize your models.

Next Steps next-steps

Now that you have defined the structures of your Content Fragments by creating models, you can move on to the third part of the getting started guide and create folders where you are storing the fragments.

For complete details about Content Fragment Models, see Content Fragment Models documentation