Gaurav
Gaurav

Reputation: 259

Live copies of experience fragment - AEM 6.5

We are on AEM 6.5.3. I have an experience fragment in the "en" language. And I want to create a live copy of this XF in the es languages. When I select experience fragment and click on create, I see an option to create variation-as live copy, but that creates the live copy in the same hierarchy. But my requirement is to create the live copy under “es” language. I don’t want to use the language copy option because there will not be any relationship b/w en XF and es XF. I want the live copy relation b/w the two (as we maintain the relationship in content pages). This is doable on content pages but not an experience fragment. I mean under content, I can create one page under en, and live copy config can roll out the same page in es language. How to achieve similar functionality in XF.

Another thing is when we use the XF component on the en content page, MSM creates the live copy in es language, But experience fragment path is not translated to match relative to es language. Basically, the inclusion of the experience fragment on the page does not update to match the language of the page.

How do we achieve the above two functionalities?

Upvotes: 0

Views: 4229

Answers (2)

jwepurchase
jwepurchase

Reputation: 743

This is a bit of a hack solution, but XF variations do support the move function. You can create one XF under you language masters and another where you expect to create your published XFs - both using the same XF template. With this set up, you can create a variation-as-live-copy in your language master and then move it to the other XF template instance. It will retain the live copy connection to the language master and you'll be able to roll out as expected. To make this solution work, avoid using the default variant named "master" - it is required and so cannot be easily moved. More details can be found here: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/live-copies-of-experience-fragment-aem-6-5/qaq-p/365482

Upvotes: 0

Alexander Berndt
Alexander Berndt

Reputation: 1728

Using the MSM for Experience Fragments (XPF) is not supported by AEM. This is because AEM uses MSM relationships for XPF variations. So this doesn’t support your (and many others) requirements. You cannot have the same hierarchy of live- and language-copies, as for the normal content. And you cannot have XPF references, that are automatically adjusted during rollout or translation of the normal content.

The alternative is to implement an old-fashioned content library:

  • Inside your sites structure (in each branch), you create a special folder “Content Library”
  • There you create pages with “Content Snippets” or “Content Fragments”
  • You create a custom “Reference” component, that just contains a reference (path) to an content snippet, and renders it (instead of itself)

In detail the problems with OOTB implementation of XPF are:

  • You cannot have Livecopies of livecopies. So you could not use XPF variation

  • But Adobe forbid this explicitly by enforcing a fixed path structure, based on sling:folder's

    /content/experience-fragments(/[sling:folder])*/[Generic XPF Page]/master /variation1 /variation2

The AEM UI explicitly looks for the sling:folder – otherwise it doesn’t offer any menu actions. But the sling:folder is not supported by MSM. So you cannot fake a MSM hierarchy and get a working XPF.

It was not built for your scenario.

Upvotes: 2

Related Questions