Expand my Community achievements bar.

SOLVED

How do I programmatically Activate tree ?

Avatar

Level 2

Hi All,

 

I am using Replicator API to replicate tree of a given path. We've list of path which needs to be activated. Currently we are looping through list and activating one by one path.

replicator.replicate(session, ReplicationActionType.ACTIVATE, path,    options);

 

I didn't find any better example of using Activate tree functionality. How do I activate /content/dam/<folder> in one go using API ?

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Level 2

Thanks All for reply. As of now we have restricted number of pages on Activation. And activate main page which invalid dispatcher cache within that.

View solution in original post

8 Replies

Avatar

Level 10

Did your API code not activate CQ content under path? 

Avatar

Level 2

Other option I can think of is, create a launcher configuration or event listener for that path and do replication for all pages under that path

Avatar

Level 2

Check the code for the Activate Tree feature: https://docs.adobe.com/docs/en/aem/6-1/author/page-authoring/publishing-pages.html#Activating a complete section (tree) of your website

I believe that the page is no long included by default in AEM 6 unless you start the instance with the "samplecontent" runmode: https://docs.adobe.com/docs/en/cq/5-6-1/deploying/configure_runmodes.html#Using samplecontent and nosamplecontent

Avatar

Employee Advisor

I am not aware of a API method which activates a complete tree. So your approach is the way to go.

Jörg

Avatar

Administrator

Hi

Apart from above mentioned, we would like you to go through a similar thread:-

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

//Programmatically activate pages in batches

 

I hope this would act as some help.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

Avatar

Level 2

smacdonald2008 wrote...

Did your API code not activate CQ content under path? 

 

Activating the given path does not activate child node within that path. But It invalid every page withing that path in Dispatcher. That's also good for me.

Avatar

Level 2

psjaison wrote...

Other option I can think of is, create a launcher configuration or event listener for that path and do replication for all pages under that path

 

The reason , I don't want to implement this is, every time number of page/path going to be different and dynamically determined and only wants to activate pages which are affected by some event, not all pages within that path.

Avatar

Correct answer by
Level 2

Thanks All for reply. As of now we have restricted number of pages on Activation. And activate main page which invalid dispatcher cache within that.