Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

AEM 6.4 : Replicate content to a different folder


Level 4

Hello All, I am looking to see if there is an option to publish the content from author to a different path in the receiving end.

Eg: Path in author:




This could be published to the received to the folders(in bold)

/content/dam/xyx/logo/logo.jpg --> /content/dam/public/xyx/logo/logo.jpg

/content/dam/xyx/image/img.jpg --> /content/dam/protected/xyx/image/img.jpg

My replication will  be a process step in a workflow. Is this doable?



3 Replies


Community Advisor


Check below link which has same question and solution

Replicating a CQ page to two different paths in CQ publisher

After replicating you can deactivate programmatically actual path if needed.


Level 10

You can use the AEM Replication API to build workflows. See this HELPX article:

Adobe Experience Manager Help | Replicating Adobe Experience Manager Content using the Replication A...

If you look at the API call - you can define the path:

//Inject a ResourceResolver - make sure to whitelist the bundle

    Session session = wfsession.adaptTo(Session.class);

    ResourceResolver resourceResolver = resolverFactory.getResourceResolver(Collections.singletonMap("user.jcr.session", (Object) session)); 


    // Create leanest replication options for activation

    ReplicationOptions options = new ReplicationOptions();

    // Do not create new versions as this adds to overhead


    // Avoid sling job overhead by forcing synchronous. Note this will result in serial activation.


    // Do NOT suppress status update of resource (set replication properties accordingly)


    log.info("**** ABOUT TO REPLICATE" ) ; 

    //Rep the content      replicate(Session session, ReplicationActionType type, String path)


Hope this helps you!


Level 4

Hello Scott, Thanks for the reply.

I am aware of using Replication API in workflow and I have been using that. The problem that I am trying to solve is how to take the content from Author to a different path in Publisher.

So as mentioned in the link,Replicating a CQ page to two different paths in CQ publisher   is a custom Transport handler the only option for this.