Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

How were Experience Fragment language masters intended to be used?

JohnPurchase
Level 2
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
Himanshu_Singhal
Correct answer by
Community Advisor
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

9 Replies
Himanshu_Singhal
Correct answer by
Community Advisor
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

JohnPurchase
Level 2
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.
vanegi
Employee
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

JohnPurchase
Level 2
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.
Himanshu_Singhal
Community Advisor
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. 

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

Himanshu_Singhal
Community Advisor
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.
JohnPurchase
Level 2
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.