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?
You can use the AEM Replication API to build workflows. See this HELPX article:
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.
ResourceResolver resourceResolver = resolverFactory.getResourceResolver(Collections.singletonMap(
, (Object) session));
// Create leanest replication options for activation
ReplicationOptions options =
// 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)
"**** ABOUT TO REPLICATE"
//Rep the content replicate(Session session, ReplicationActionType type, String path)
Hope this helps you!
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.