How to Use the AEM Content Fragment Model

Adobe Experience Manager (AEM) is a powerful content management system that enables developers and marketers to create, manage, and deliver personalized digital experiences. One of AEM’s most valuable features for headless content delivery is the Content Fragment Model (CFM)—a structured way to define reusable content across channels.

In this blog, we'll explore what the Content Fragment Model is, how to create and use it in AEM, and why it's essential for modern headless CMS strategies.


📌 What Is a Content Fragment Model in AEM?

A Content Fragment Model (CFM) defines the structure and types of content fragments in AEM. Think of it as a schema or template for creating consistent and structured content blocks. These models support structured data types like:

Text (multi-line or rich text)

Number

Date/Time

Boolean (true/false)

Enumeration (drop-down options)

Content reference (link to assets or pages)

Once a model is created, authors can use it to create multiple Content Fragments (CFs) that follow the same format. These fragments can be delivered via APIs, GraphQL, or embedded in pages.


🚀 Benefits of Using Content Fragment Models

✅ Structured Content: Ensures consistency across content types

✅ Headless Delivery: Easily fetch content via APIs for web, mobile, or IoT

✅ Reusability: One source of truth across different pages and channels

✅ Author-Friendly: Provides a simple interface for content authors

✅ Multichannel Ready: Great for omnichannel publishing strategies


🧰 Step-by-Step: How to Use Content Fragment Models in AEM

Step 1: Enable Content Fragment Models

Ensure that CFM support is enabled for your project in AEM:

Go to Tools > General > Configuration Browser

Create or open a configuration folder (e.g., /conf/myproject)

Open the properties and enable Content Fragment Models


Step 2: Create a Content Fragment Model

Navigate to Tools > Assets > Content Fragment Models

Select the correct configuration folder (e.g., /conf/myproject)

Click Create > Content Fragment Model

Give it a name like “Blog Article” or “Product Detail”


Step 3: Add Data Fields

Inside the model editor:

Add fields such as:

Title (Text field)

Body (Rich Text)

Author (Text)

Date (Date/Time)

Category (Enumeration with options like "Tech", "News", "Travel")

You can also set validations like “Required” or “Maximum Length” for fields.


Step 4: Create a Content Fragment

Go to Assets > Files

Navigate to a folder where you want to store your fragment

Click Create > Content Fragment

Choose the model you created (e.g., “Blog Article”)

Fill in the fields with relevant content


Step 5: Deliver via API

You can expose the content using AEM’s GraphQL API or Content Services:

Enable the content fragment for delivery in the model editor

Use the GraphQL endpoint to fetch structured content

Example query:

graphql


{

  blogArticleList {

    items {

      title

      body {

        html

      }

      author

      date

    }

  }

}

🏁 Final Thoughts

Using the AEM Content Fragment Model is an efficient and scalable way to manage structured content in a headless or hybrid CMS setup. It enables content reuse, consistency, and seamless multichannel delivery—empowering both developers and authors to work faster and smarter.

Whether you're building a blog, product catalog, or campaign page, CFM ensures content is clean, structured, and ready for the future.


Learn AEM(Adobe Experience Manager) Training

Read More:  Introduction to HTL (HTML Template Language) in AEM
Read More:  What is Apache Sling and How Does it Power AEM?
Read More:  Working with Sling Models in AEM




Visit IHUB Talent Training Institute in Hyderabad
Get Direction

Comments

Popular posts from this blog

How to Use Tosca's Test Configuration Parameters

Tosca Licensing: Types and Considerations

Using Hibernate ORM for Fullstack Java Data Management