How to prepare report to fetch the details/data of Experience Fragment from the page in AEM | Community
Skip to main content
New Participant
July 10, 2023
Solved

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

  • July 10, 2023
  • 1 reply
  • 684 views

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 

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 aanchal-sikka

Hello @madhuyadawad 

 

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

- Properties Dialog

- References in Left Panel under Timeline

 

 

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(); }

 

 

1 reply

aanchal-sikka
aanchal-sikkaAccepted solution
New Participant
July 10, 2023

Hello @madhuyadawad 

 

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

- Properties Dialog

- References in Left Panel under Timeline

 

 

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
New Participant
July 10, 2023

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.