Hi , i have a use case to get the page from my node path and publish it using groovy script. Can we achieve this using groovy and if so could someone help me with a pseudo code . Thanks
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi,
Please check this; https://stackoverflow.com/questions/32958010/adobe-cq-aem-groovy-to-activate-a-page
Hope this helps
Views
Replies
Total Likes
Hi @Zendark
Using JS I believe you can do something like:
const bodyParts = new URLSearchParams();
bodyParts.append(':operation', 'activate');
bodyParts.append(':path', '/content/my/page');
fetch('http://localhost:4592/bin/replicate', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Authorization': 'Basic YWRtaW46YWRtaW4='
},
body: bodyParts
})
I used something like this i a previous post, but for a different use case: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/suggestions-to-extract-con...
I have not tried that js for replication, maybe it has some bugs, but at least might give you a glimpse into what api your groovy script needs to call.
Views
Replies
Total Likes
Hi,
Please check this; https://stackoverflow.com/questions/32958010/adobe-cq-aem-groovy-to-activate-a-page
Hope this helps
Views
Replies
Total Likes
@EstebanBustamanteI also was not aware about this. Thank you for sharing. I learned smth new today.
Yes, you can use the method activate(String path) to activate the passing the path ex: activate("/content/page").
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies