Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!
SOLVED

Experience Fragment | localizedFragmentVariationPath | for non-standard region/language sites

Avatar

Level 4

Hello team,

We have site structure in AEM like "/content/project-site/eu/en" where as EU is europe region and EN -english site. Similarly corresponding XF structure -  Experience Fragment structure "/content/experience-fragments/project-site/eu/en/site"

 

and for German site "/content/project-site/eu/de" and XF - "/content/experience-fragments/project-site/eu/de/site".

We are using AEM SPA with reactJs to render the pages. 

 

Issue is model.json always have XF localizedFragmentVariants - "/content/experience-fragments/project-site/eu/en/site" for EU/DE site.

 

Expected localized fragment variants path for site "/content/project-site/eu/de" must be "/content/experience-fragments/project-site/eu/de/site".

 

Please let me know how we can achieve this retrieving language specific XF for EU/DE site.

We have achieved this for multipage sites but not finding way to customize for SPA pages where data exported via model.json.

 

Quick responses much appreciated. thanks

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hello, resolved the issue by extending the abstract class "AbstractComponentImpl" and implementing "ExperienceFragment" interface.

 

and we need to override the methods "getLocalizedFragmentVariationPath()" and getChildren() methods.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 4

Hello, resolved the issue by extending the abstract class "AbstractComponentImpl" and implementing "ExperienceFragment" interface.

 

and we need to override the methods "getLocalizedFragmentVariationPath()" and getChildren() methods.