Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Content Fragment Model - customization - composite data structure

piotrr32520682
Level 2
Level 2

Hi,

 

I was trying to add custom fields to content fragment models. I wanted to keep image data as node below to have following schema /content/dam/my-model/image and there will be a list of props related to this image. 

 

I added the new editor type in /apps/settings/dam/cfm/models/formbuilderconfig/datatypes/items/image

piotrr32520682_0-1626763977140.png

 

Moreover I created my custom property definition basing on /libs/dam/cfm/models/editor/components/datatypeproperties/maptopropertyfield and removed "field-propertyName-validator" to bypass the name of the field validation (/ was not allowed to use)

 

 

After that I wanted to create example model but in the result I got the error:

piotrr32520682_2-1626764367211.png

 

It looks that AEM tries to add lastModified property for each field and if fails on more sophisticated data structure.

 

Does it mean that content fragment was designed only to keep flat models and I am heading in wrong direction?

What should I use to model the composite data structure?

 

 

1 Accepted Solution
kishorekumar14
Correct answer by
Level 8
Level 8

hi @piotrr32520682 ,

 

Yes, as of now Content Fragments doesn't support to have composite field structure. To overcome this Fragment Reference can be used to have a nested content. 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/assets/content-fragments/co... 

If you are planning to use Content Fragments as an API, AEM aaCS GraphlQL comes with segmented json output for this.

View solution in original post

1 Reply
kishorekumar14
Correct answer by
Level 8
Level 8

hi @piotrr32520682 ,

 

Yes, as of now Content Fragments doesn't support to have composite field structure. To overcome this Fragment Reference can be used to have a nested content. 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/assets/content-fragments/co... 

If you are planning to use Content Fragments as an API, AEM aaCS GraphlQL comes with segmented json output for this.

View solution in original post