Expand my Community achievements bar.

SOLVED

How to prepare report to fetch the details/data of Experience Fragment from the page in AEM

Avatar

Level 2

Hi,

Can you please help me with the below requirement.

How to Fetch the report of a XF fragment, like if we select any fragment it should fetch details of where all the pages the fragment is present.

 

Thank You

 

@arunpatidar 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @madhuyadawad 

 

For pages, assets, XF etc, we have references available in:

- Properties Dialog

- References in Left Panel under Timeline

 

aanchalsikka_0-1688977524775.png

 

On API level you can use the ReferenceSearch API

ReferenceSearch referenceSearch = new ReferenceSearch();
referenceSearch.setExact(true);
referenceSearch.setHollow(true);
referenceSearch.setMaxReferencesPerPage(-1);
refSearch.setSearchRoot(referenceSearchRoot);

Collection<ReferenceSearch.Info> resultSet = referenceSearch.search(resolver, path).values();

for (ReferenceSearch.Info info: resultSet) {
   Page referencingPage = info.getPage();
}

 

 


Aanchal Sikka

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hello @madhuyadawad 

 

For pages, assets, XF etc, we have references available in:

- Properties Dialog

- References in Left Panel under Timeline

 

aanchalsikka_0-1688977524775.png

 

On API level you can use the ReferenceSearch API

ReferenceSearch referenceSearch = new ReferenceSearch();
referenceSearch.setExact(true);
referenceSearch.setHollow(true);
referenceSearch.setMaxReferencesPerPage(-1);
refSearch.setSearchRoot(referenceSearchRoot);

Collection<ReferenceSearch.Info> resultSet = referenceSearch.search(resolver, path).values();

for (ReferenceSearch.Info info: resultSet) {
   Page referencingPage = info.getPage();
}

 

 


Aanchal Sikka

Avatar

Level 2

Hi,

 

Thank you for the above solution. Can you please say the query builder code in aem 6.5 to fetch those pages present under references.