composite multifield, image types in content fragments | Community
Skip to main content
sreenu539
Level 7
May 24, 2023

composite multifield, image types in content fragments

  • May 24, 2023
  • 2 replies
  • 985 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

MayurSatav
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
May 25, 2023

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

 

sreenu539
sreenu539Author
Level 7
May 30, 2023

 

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?

aanchal-sikka
Community Advisor
Community Advisor
October 18, 2023

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