Content fragment Reference to Variations of Content fragments | Community
Skip to main content
Level 2
October 17, 2022
Solved

Content fragment Reference to Variations of Content fragments

  • October 17, 2022
  • 1 reply
  • 1139 views

Hi All,

Currently we are not able to add a fragment reference to a variation of Another ContentFragment in the reference path browser in the ContentFragment model. We are using AEM as cloud.

Has anybody tried this or anybody has done any customisation to same?

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 krati_garg

Hi @nbhat-rh 

Please find my comments inline:

 

Thank you for the reply, Basically business wanted the ability to reference a variation of the fragment to be able to define and select the slight different content fragments.

-Consider creating a Content Fragment Model, and create a fragment which will act as default CF, wherever this CFM is being referred. More CFs can be created out of same CF Model.
Here the default CF can act as Master Variation and rest of the CFs can act as other variations. 

They also want to display the title of the referenced content fragment just above the path field.
-Content Fragment Model Data Types are highly customizable and extensible. Please see below link for various possibilities:
https://github.com/AdobeDocs/experience-manager-64.en/blob/main/help/sites-developing/customizing-content-fragment-model-data-types.md

 

Please suggest further if you have any other solutions.

Thanks

1 reply

krati_garg
Adobe Employee
Adobe Employee
October 18, 2022

Hi @nbhat-rh

We can't refer a variation of another Content Fragment. However, if you can share the usecase around it, an alternate solution can be suggested, before you move towards customization.
Also, customizing and possibly making a CF refer variation of another CF, is breaking the Content Structural Hierarchy, the way Content Fragment Models has been designed for.

 

nbhat-rhAuthor
Level 2
October 18, 2022

Hi Krati,

Thank you for the reply, Basically business wanted the ability to reference a variation of the fragment to be able to define and select the slight different content fragments.

 

They also want to display the title of the referenced content fragment just above the path field.

Please suggest further if you have any other solutions.

Thanks

krati_garg
Adobe Employee
krati_gargAdobe EmployeeAccepted solution
Adobe Employee
October 18, 2022

Hi @nbhat-rh 

Please find my comments inline:

 

Thank you for the reply, Basically business wanted the ability to reference a variation of the fragment to be able to define and select the slight different content fragments.

-Consider creating a Content Fragment Model, and create a fragment which will act as default CF, wherever this CFM is being referred. More CFs can be created out of same CF Model.
Here the default CF can act as Master Variation and rest of the CFs can act as other variations. 

They also want to display the title of the referenced content fragment just above the path field.
-Content Fragment Model Data Types are highly customizable and extensible. Please see below link for various possibilities:
https://github.com/AdobeDocs/experience-manager-64.en/blob/main/help/sites-developing/customizing-content-fragment-model-data-types.md

 

Please suggest further if you have any other solutions.

Thanks