Hi again,
Would like to ask if there is any services or events that I can listen from the Preprocessor to determine if the replication action is for Preview or Publish.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @LyonMartin
I have not tried that but can you check if you can use below get replicationType/agentType details from
Hi @LyonMartin
Publishing some content for preview purpose is done via Manage Publication UI, where you can choose if you content is either for Publish or Preview. Maybe you can start there, open browser Inspect and try to figure out how AEM handles it. Which request is made to AEM server, how AEM knows your selection to decide that it need to do the work for preview or publish and so on. This may put you on a path to know what to think of to out in your code base, to have a similar logic.
https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/sites/authoring/...
Once you have a fulcrum, then you can thing of a way to inject your logic in the preprocessing phase. Some examples and useful comments here:
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/override-replication-behav...
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/disable-or-override-ootb-r...
Update: @MukeshYadav_ suggestion sounds really to the point also
Views
Likes
Replies