AEM Content Fragments: Custom ModelsAEM Content Fragments: Custom Models

Tech Insights

7 min read

Data Mesh Myths

Tags

#AEM

#Content Fragments

#Digital Marketing Technology

Share

By default, only the “Simple Fragment” model is available in AEM to create a Content Fragment (CF) ( > libs > settings > dam > cfm > templates > simple). It has only one RTE field called “Main,” but sometimes we may need something more complex. In this article, we’ll take a look at how to create a custom AEM Content Fragment Model.

Setup

AEM Content Fragment Models, the data schemas of Content Fragments, must be enabled via AEM’s Configuration Browser, which allows Content Fragment Models to be defined on a configuration-by-configuration basis.

To enable content fragment models, you need to:

1. Enable the use of Content Fragment Models in the Configuration Browser:

a. Go to Tools -> General -> Configuration Browser b. Create a new configuration

Photo instruction of how to create a new configuration

2. Apply the configuration to your Assets folder:

a. Create a new Folder for your fragments called “Content Fragments” b. Go to folder properties -> Cloud Services -> apply newly created cfm-config

Photo instruction of how to create a new Folder for your fragments

Custom Model

Let’s create a simple model to describe a location. It will have the following fields:

1. Country 2. Phone Number 3. Email 4. Address

1. Go to Tools -> Assets -> Content Fragment Models 2. Select cfm-config 3. Click Create -> Enter Title “Location”

Photo instruction of how to add a location

Now you can customize your model. In the bar on the right, you’ll see available field types. You can just drag and drop them, then configure field names, labels, default values, etc.

The resulting model will be like this:

The resulting model

Now you can create a CF based on your model:

1. Go to your folder for Content Fragments: > content > dam > content-fragments 2. Click Create Content Fragment 3. Select “Location” model 4. Fill the fields -> Save

create a CF image

It’s easy to create your data patterns using Content Fragments. In future articles we’ll take a look on how to use them on a page.

Author: Iryna Ason

Resource Hub

Our Latest Stories & Industry Insights

View Resource Hub

Creating A Custom AEM RTE Plugin

16 min read

January 29, 2026

#AEM

#AEM Tips

#Digital Marketing Technology

Scientifically Measuring The True Impact Of Generative AI Software Development

22 min read

January 29, 2026

#AI & ML

#Engineering

#Generative AI

Should You Trade Your Old AEM for The Cloud?

10 min read

November 13, 2024

#AEM #Digital Experience #Digital Marketing Technology

Localization Testing: Tips and Tricks for RTL Language Websites and Apps

25 min read

May 10, 2024

#Engineering #QA

Two people sitting at a table with a laptop.

Let’s make your next project faster, safer, smarter.

Get In Touch