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

FragmentReference property of Content Fragment Model

  • January 6, 2025
  • 1 reply
  • 496 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.

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
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
Community Advisor
Community Advisor
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
Community Advisor
Kamal_KishorCommunity AdvisorAccepted solution
Community Advisor
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.