AEM Cloud Service — Composite Multifield in Content Fragments Editor(New Editor by Albin Issac
Overview
In this post, we’ll explore how to enable multifield support in the new CF Editor — a common requirement in many implementations. While one approach is to use a reference Content Fragment Model, having a true multifield is often more intuitive and flexible.
Nice solution, but I would suggest everyone to think twice before deciding to build a custom multifield for the new CF editor. The standard approach when requiring multifields would be to create separate content fragments instead. The same is true for the new Universal Editor, instead of creating multifields just add child components instead.
While this simple example will work fine, please avoid adding references in custom multfields, as these will be stored as JSON and AEM will not recognize the references. Therefore, you will have problems with MSM operations like live copy, as well as copy/move operations. After years of working in AEM, my usual advice to both clients and developers is to avoid heavy customization unless it is really necessary.
@daniel-strmecki - Thanks for the tips. Related question. We're having an issue with the newest version of AEMaaCS where we have a composite multifield of fragment references where the "Edit Content Fragment" button no longer shows up with editing the fragment. Is this possibly related to a change in how AEM handles composite multifields? It sounds like your advice is to just create a fragment model that is composed of the 2 fragments your using in the multifield?
yes, avoid having references in composite multifields and use the OOTB fragment reference instead. The new CF editor have a breadcrumb-like feature so editors can simply navigate between the referenced and original CF.
@Albin_Issac Thanks for sharing this. Multifield support in the new CF editor is something I’ve seen a lot of teams asking about. Your approach makes it much more intuitive. From your perspective, do you see this being better suited for complex data structures (like nested content) or more for simpler repeated fields where authors just want flexibility? Interested in how you’d draw that line.