Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

composite multifield, image types in content fragments

Avatar

Level 7

Hello AEM community,

 

Quick question:

 

Does out of the box content fragment model provide "composite multifield" data types.?

I have set of buttons with text, url to be authored.

 

Also, is there any specific date type for images or use content reference data type?

 

Thanks for help,

Sri

3 Replies

Avatar

Community Advisor

Hi @sreenu539 ,

 

No, the ootb Content Fragment Models in AEM do not provide a "composite multifield" data type. The CFM schema supports basic data types such as text, number, date, boolean, and path. To achieve a composite multifield functionality, you would need to create a custom data type in your CFM. This can be done by extending the existing data types or implementing a custom data type using Adobe Experience Manager (AEM) Core Components.


There is no specific data type for images in CFM. However, you can use the "path" data type to reference the path of an image asset in the repository. This would allow authors to select an image asset using the path browser or by entering the path manually.

 

https://www.aemtutorial.info/2019/02/how-can-we-create-custom-datatype-in.html

 

Avatar

Level 7

 

I tried to overlay and create a "composite multifield" but not successful. All I could say is , when there is multifield, nested multifield in a component dialog, why can't aem has this support for content fragment models as well.

 

Is there any architectural , design limitations on why AEM doesn't have this as part of product?

Avatar

Community Advisor

Composite multi-field implementation needs should be dealt via nested content fragment models. Its also a recommendation from Adobe.

So, you would have

  • One CF model to have fields specific to Button.
  • One CF model to have a multifield of these buttons (via multifield Content reference)

 

Benefits:

- Granular GraphQL queries

- It will follow (Oraganism-Model-Atom model).

 

For guidelines on designing CFM, please refer to RTE 


Aanchal Sikka