Expand my Community achievements bar.

SOLVED

Experience Fragments

Avatar

Level 1

Is there a way to create experience fragments programatically? We have a custom template to create experience fragments. I used PageManager API to create a page out of this template but it did not come up like a experience fragment with a variation.

i could find a API for content fragments which is  ContentFragmentManager, Is there anything similar for experience fragments

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

There is no API to create XF with variation, you can create default variation node again using PageManager API.

Though there are APIs to fetch xf details

com.adobe.cq.xf ("The Adobe AEM Quickstart and Web Application.")



Arun Patidar

View solution in original post

4 Replies

Avatar

Community Advisor

Hi,

Experience Fragments are the pages, so you can use PageManager and Page API to create experience fragments.

PageManager ("The Adobe AEM Quickstart and Web Application.")



Arun Patidar

Avatar

Level 1

When we create a experience fragment using HTML or we.retail template it creates a default variation ( 2 level hierarchy). But when we use pagemanager API it creates a page and not a experience fragment.

Avatar

Correct answer by
Community Advisor

Hi,

There is no API to create XF with variation, you can create default variation node again using PageManager API.

Though there are APIs to fetch xf details

com.adobe.cq.xf ("The Adobe AEM Quickstart and Web Application.")



Arun Patidar

Avatar

Level 2

Is there any solution / alternative to create experience fragments programmatically, which will help for bulk creation of experience fragment ( Team site  to AEM migration use case which consist of thousands of files) ?

Or will have to create experience fragment manually ?