Expand my Community achievements bar.

SOLVED

Content Fragment Variations does not appear in .model.json

Avatar

Level 2

Hi All. 

 

I am using Content Fragments List and use page.model.json to get all content fragment details. 

 

However, if I use variations in CF, that detail does not appear in page.model.json. It only shows master variation details. 

 

How to solve this? 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

It is working as expected-

 

https://aemcomponents.dev/content/core-components-examples/library/page-authoring/content-fragment-l...

 

If you want the variations you need to extend the content fragment list component and update the model as per ur requirement

View solution in original post

5 Replies

Avatar

Community Advisor

Could you please share the steps what did you try?

As i just tried and the variation and master content fragments are coming in model.json-

 

Ankur_Khare_0-1634702299904.png

 

Avatar

Level 2

Hi @Ankur_Khare 

 

1. I created CFM and multiple CF from it. 

2. I created a test page and added Content Fragment List component to it referring the CFM above there. 

3. Accessing testpage.model.json in browser which brings all Content Fragments details but only master version not the variations. 

Note: If I directly access individual CF as /api/assets/myproject/fragments/registration.json it shows variation but not when I use .model.json selector on a page with CF List component. 

Avatar

Correct answer by
Community Advisor

It is working as expected-

 

https://aemcomponents.dev/content/core-components-examples/library/page-authoring/content-fragment-l...

 

If you want the variations you need to extend the content fragment list component and update the model as per ur requirement

Avatar

Level 2

Thanks @Ankur_Khare . That clarifies that it is not available out of the box.