FragmentReference property of Content Fragment Model | Community
Skip to main content
Keerthi0555
Level 5
January 6, 2025
Solved

FragmentReference property of Content Fragment Model

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.

 

 

Kamal_Kishor
Kamal_KishorAccepted solution
New Participant
January 6, 2025

@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.

2 replies

Kamal_Kishor
New Participant
January 6, 2025

@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.

thanks.

Translate
Kamal_Kishor
Kamal_KishorAccepted solution
New Participant
January 6, 2025

@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.

Translate