Expand my Community achievements bar.

Join us in celebrating the outstanding achievement of our AEM Community Member of the Year!

FragmentReference property of Content Fragment Model

Avatar

Level 6

We have a requirement to allow multiple models in single fragment reference but fragmentReference is a saving only single cf model in it as it's of type string not string array but in the interface it is taking multiple values but not storing in jcr multiple values.

 

Keerthi0555_0-1736159857512.png

 

2 Replies

Avatar

Community Advisor

@Keerthi0555 : What this means is that you can select content-fragments created with these Models only. If you want to select multiple content-fragments, you will have to specify "Render As" field as multifield. With current selection fragmentreference, you can select only one content-fragment at a time.

Kamal_Kishor_0-1736166889499.png

thanks.

Avatar

Community Advisor

@Keerthi0555 : If you save the CF model after selecting only 1 model in this field, it may store "fragmentmodelreference" as a String property. However, when you select multiple values, it stores all of them but the property type still remains String. I checked this in CRX and can see it stores multiple values.

What you should check is if it lists all the content-fragment models creating using all of these models when you create a content-fragment using this model.

 

thanks.