Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

How to achieve Composite Multifield for Content fragments

Avatar

Level 2

Hi,

 

I am trying to create a content fragment model where I can have multi-line composite multifields on the model. For example, when creating a content fragment, I would like to provide the option of adding a composite multifield where I can create a combination of image, texts and links tied together.

I found few options which involved overriding the content fragment model dialog, which we don't want to do it.

Any suggestions / solutions will be useful.

 

@Vijayalakshmi_S  @arunpatidar @Suraj_Kamdi 

6 Replies

Avatar

Level 2

We use AEM 6.5 with SP 6.5.19

Avatar

Community Advisor

Hi @Vanitha_Duraisamy ,

Use Smaller Content Fragments + Multi-Reference Field

Step 1: Create a Small Content Fragment Model for the Composite Item

Create a content fragment model called, for example, ImageTextLinkItem with fields:

Step 2: Create Your Main Content Fragment Model

Create the main model that will contain your composite list.

Add a multi-reference field to this model that references the smaller ImageTextLinkItem fragments.

Step 3: Authoring Experience

When authors create a Content Fragment based on your main model, they can:

Add multiple references — each pointing to an instance of the smaller fragment (ImageTextLinkItem).

For each referenced fragment, they enter an image, text, and link as a grouped unit.


Step 4: Rendering

At runtime or in your frontend, you resolve these referenced fragments.

For each referenced fragment (ImageTextLinkItem), you get the image, text, and link values.

You render them as a grouped item in the UI.

Example Scenario:

1. Models:

ImageTextLinkItem (small fragment with image, text, link)

MainContent (large fragment with multi-reference field to ImageTextLinkItem)

2. Authoring:

  - Author creates a MainContent fragment

  - Clicks “Add” on the multi-reference field

  - Picks or creates new ImageTextLinkItem fragments (each with its own image/text/link)

  - Saves

3. Rendering:

  - Frontend fetches MainContent fragment

  - Iterates over referenced ImageTextLinkItem fragments

  - Displays their data as a list of composite items

Regards,
Amit

Avatar

Level 8

Hi @Vanitha_Duraisamy ,

You can refer to this guide for working with composite multifields in AEM: https://jimfrenette.com/aem/content-fragments/composite-multifield/.
Alternatively, if your use case does not require customization, you may consider using Content Fragment References, which could meet your requirements out of the box.

Hi @narendiran_ravi ,

 

We don't want to override the content fragment model dialog as given in https://jimfrenette.com/aem/content-fragments/composite-multifield/.

We also don't wanna use fragment references. 

Could you me know if you have any other solutions.

Avatar

Community Advisor

Hi @Vanitha_Duraisamy,

Unfortunately, AEM does not currently support native composite multifields (i.e., nested structured multifields) inside Content Fragment Models without custom code or fragment references.

However, here are three alternative solutions worth considering:

1. Use JSON Object Field (Native) with Manual JSON Entry or Limited UI Customization
  • AEM Content Fragment Models support a JSON Object field.

  • You can guide authors to enter structured objects via a form UI (simple fields) and convert it to JSON in the background using minimal JS.

  • Write a lightweight Content Fragment Editor extension (via Extension Manager) that builds a composite UI on top of the JSON Object.

2. Concatenated String Field with Delimiters
  • Use a multi-line text field where authors enter values like:

    name:John|age:30|city:Toronto name:Jane|age:28|city:Paris
  • At runtime, parse this string into a JSON structure.

3. Custom UI using AEM Universal Editor Extension (Cloud Service only)

If you are on AEM as a Cloud Service, use the AEM Extension Framework to build a plugin that renders a composite UI for the JSON field.

Hope that helps!


Santosh Sai

AEM BlogsLinkedIn


Avatar

Level 4

Hi @Vanitha_Duraisamy,

Did the shared solution help you out? If yes, kindly consider marking the most suitable answer as ‘correct’.

If you’re still facing any challenges, please feel free to continue the conversation here. We’re happy to support further.