Use SPA editor for Experience fragments for remote SPA(Next js or React) Application | Community
Skip to main content
Level 2
May 6, 2024
Solved

Use SPA editor for Experience fragments for remote SPA(Next js or React) Application

  • May 6, 2024
  • 1 reply
  • 1132 views

Hi, we want to implement header and footer for AEM Headless with remote SPA(Next Js). Will that be possible by using experience fragments? Will I get SPA editor for editing the experience fragments components? Please suggest some pointers? Thanks in Advance.

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 avesh_narang

Experience fragment should be created as is only , but make sure remote SPA editor should be configurated with AEM instance appropiately.

Reference : https://experienceleague.adobe.com/en/docs/experience-manager-learn/getting-started-with-aem-headless/spa-editor/remote-spa/spa-bootstrap

 

1 reply

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
May 6, 2024

Hi, 

Yes, you can edit XF via SPA editor; you just need to follow the same principles to make any component editable in the SPA editor. Map the component, use a sling model, and register it in the SPA code. Keep in mind that for the header and footer, you should have two components mapped into the SPA: the XF and also the header/footer.

You can check this example of how components are mapped in NextJS:

https://github.com/adobe/aem-headless-app-templates/blob/main/nextjs-remotespa/components/import-components.js

 

 

Hope this helps.

Esteban Bustamante
Level 2
May 8, 2024

Is there any reference on how to create experience fragment template that supports remote SPA. Any pointers would be helpful.

avesh_narang
avesh_narangAccepted solution
Level 3
May 19, 2024

Experience fragment should be created as is only , but make sure remote SPA editor should be configurated with AEM instance appropiately.

Reference : https://experienceleague.adobe.com/en/docs/experience-manager-learn/getting-started-with-aem-headless/spa-editor/remote-spa/spa-bootstrap