Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Content fragment Reference to Variations of Content fragments

Avatar

Level 2

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?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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

 

Please suggest further if you have any other solutions.

Thanks

View solution in original post

4 Replies

Avatar

Employee Advisor

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.

 

Avatar

Level 2

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

Avatar

Correct answer by
Employee Advisor

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

 

Please suggest further if you have any other solutions.

Thanks