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

FragmentReference property of Content Fragment Model

  • January 6, 2025
  • 1 reply
  • 493 views

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.

 

 

Best answer by Kamal_Kishor

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

1 reply

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.

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.