Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

How were Experience Fragment language masters intended to be used?

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.  

View solution in original post

11 Replies

Avatar

Correct answer by
Community Advisor

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.  

Avatar

Level 2
This isn't a solution - you can't leave the live copy in place and still have the core XF component find it. See Arun's comments below.

Avatar

Level 3

How can this be used in live-copy of a page. if we use laguage-master page to add an XF in it, that XF will be added for all the live-copies right.? how come this XF live-copy will be referred and work fine.?

Avatar

Employee

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

Avatar

Level 2
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.

Avatar

Community Advisor

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. 

Avatar

Level 2

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.

Avatar

Community Advisor
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.

Avatar

Level 2
This does work, so thanks for that. But it is a bit of a hack. Because I need the paths and names to match up, I've got to create XFs I don't want, delete them, go to my language master, create an XF live copy with the wrong name, and move it to the place it needs to be while ensuring that I've got the correct name so that the core XF component can find it. Not looking forward to explaining this process to clients.

Avatar

Level 1

Hi @JohnPurchase  can u explain it step by step. 

for one of our client we have one set of templates, based on it xf has been created for en-us, but we gonna implement MSM with multiple languages, but in my spanish language copy the XF is referring to en-us.

 

Since the XF path is configured in template i cannot have that changed as per language copy. If you clearly provide steps we can implement and try it.

 

requirement: MSM with different languages which has XF as well so we need language copies and live copies for pages and XF for each language we create.