How were Experience Fragment language masters intended to be used?

Avatar

Avatar

JohnPurchase

Avatar

JohnPurchase

JohnPurchase

25-06-2020

I've seen experience fragments structured with language masters in a couple of places. One would be the documentation here:

https://docs.adobe.com/content/help/en/experience-manager-core-components/using/components/experienc...

In Sites, I can create live copies of my language masters; I don't see that as an option for XFs. One poster on stack overflow suggests that this is not possible:

https://stackoverflow.com/questions/62226751/live-copies-of-experience-fragment-aem-6-5

I haven't checked, but I suspect that the folder data type excludes the properties required to track live copies. Is there really no means to sync an XF to a language master?

Current best practice is to use XFs to normalize site headers and footers. The core XF component assumes page and XF structure mirror each other in order to perform localization, which means I've got at least two footer XFs per language (example: German language master, German in my regional Germany site, German in my regional Swiss site, etc) and no automated way to keep them in sync.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Himanshu_Singhal

MVP

Avatar

Himanshu_Singhal

MVP

Himanshu_Singhal
MVP

25-06-2020

Well, it's possible to create Live Copies for XF but it's possible to track it via Blueprint. The content sync feature applies b/w XF and it's live copies as well. 

Screenshot 2020-06-25 at 15.07.52.png

And, of course, you got the part right about using it as header/footer for best practices. So, you can create the master copy for XF and create live copies for languages accordingly and keep it in Sync.  

Answers (2)

Answers (2)

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

879

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

879
Arun_Patidar
MVP

25-06-2020

Avatar

Avatar

vanegi

Employee

Avatar

vanegi

Employee

vanegi
Employee

25-06-2020

Hello John,

You can create a variation of XF as a live copy and can keep these variations in sync with the use of Live Copy. See https://docs.adobe.com/content/help/en/experience-manager-learn/sites/experience-fragments/experienc... for more details.

 

Thanks,

Vaishali

JohnPurchase
Unfortunately, this doesn't put them in the correct place for the core experience fragment component to localize them. As per the documentation I referenced, the XF MSM structure must mirror the Sites MSM structure.
Himanshu_Singhal

The XF MSM structure must mirror the Sites MSM structure - you're right about it. Instead of maintaining 2 XF for German, you can create master German XF and using which create 2 variations (1 for regional and another for Swiss) to have it maintained live copies. 

JohnPurchase

Still no - you can create the variation as live copy, but it won't be where it needs to be for the core XF component will look for it. You need:

  • /content/experience-fragments/xxx/language-masters/fr/footer/master
  • /content/experience-fragments/xxx/ca/fr/footer/master (which is the live copy)
  • /content/experience-fragments/xxx/fr/fr/footer/master (which is another live copy)

Not:

  • /content/experience-fragments/xxx/language-masters/footer/master
  • /content/experience-fragments/xxx/language-masters/footer/fr_ca (??)
  • /content/experience-fragments/xxx/language-masters/footer/fr (??)

They aren't even in the same folder.

If you check the localization code in the component, you'll see it doesn't do anything fancy with variations to find the localized version of the XF - it's all just path manipulation. Which is why the docs say that the two structures need to mirror each other.

Himanshu_Singhal
You're right. The later one will apply when you'll the same structure in site as well which is not possible because sites are divided based on countries-languages. So, yes, you'll have to maintained 2 copies here.