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.
Views
Replies
Total Likes
We use AEM 6.5 with SP 6.5.19
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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:
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.
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.
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!
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.
Views
Replies
Total Likes
Views
Like
Replies
Views
Likes
Replies
Views
Likes
Replies