Content Fragment Variations does not appear in .model.json | Community
Skip to main content
RonnieForum
Level 2
October 20, 2021
Solved

Content Fragment Variations does not appear in .model.json

  • October 20, 2021
  • 2 replies
  • 1813 views

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? 

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 Ankur_Khare

It is working as expected-

 

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

 

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

2 replies

Ankur_Khare
Community Advisor
Community Advisor
October 20, 2021

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-

 

 

RonnieForum
Level 2
October 20, 2021

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. 

Ankur_Khare
Community Advisor
Ankur_KhareCommunity AdvisorAccepted solution
Community Advisor
October 20, 2021

It is working as expected-

 

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

 

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

RonnieForum
Level 2
October 21, 2021

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