How to use AEM Experience fragments in third party applications | Community
Skip to main content
New Participant
November 2, 2023
Solved

How to use AEM Experience fragments in third party applications

  • November 2, 2023
  • 4 replies
  • 1967 views

We want to use AEM Experience fragments in third party applications like RefX and Sitemanager.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

kautuk_sahni
Employee
November 6, 2023

@aj_9625932 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

 

Kautuk Sahni
aanchal-sikka
New Participant
November 2, 2023

Hello @aj_9625932 

 

Please refer to following links:

https://medium.com/exadel-digital-marketing-technology-practice/aem-experience-fragments-consuming-o...

https://kiransg.com/2023/05/09/exporting-aem-experience-fragment-page-content-for-a-b-testing-and-ex...

 

Both the links contain code-snippets with use-cases on how you can export XF to external applications

Aanchal Sikka
MarkusBullaAdobe
Employee
November 2, 2023

Hi @aj_9625932!

Experience Fragments (short: XF) in AEM are a great way to reuse your content at various places, being it inside of AEM or on other channels. See also here for a high level overview. XF are usually meant to be consumed as rendered HTML for external applications/channels, see also the Plain HTML rendition.

 

If you want to expose rendered HTML to a 3rd party application, XF is the right option.

If you are looking to expose content as structured data, please refer to Content Fragments (short: CF) instead.

 

In addition to the official documentation on the differences, there's also an article that outlines the concepts and differences of the two pretty well.

 

Hope that helps!

arunpatidar
New Participant
November 2, 2023

Hi @aj_9625932 
You can expose XF as json and use the content in your third party applications.

Make sure you take care of CORS and all.

 

I you want to expose XF as HTML then expose using content selector. (e.g. /content/ex..../expereince-fragment-1/master.content.html)

Arun Patidar
New Participant
November 2, 2023

Thanks Arun, how to export as a json and use in third party applications.

Could you please let me know what are steps needs to be done to export the XF info as JSON and use in third party applications.

arunpatidar
arunpatidarAccepted solution
New Participant
November 2, 2023