Skip to main content
Level 2
Mar 11, 2016 6:52 PM UTC
Solved

How do I programmatically Activate tree ?

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
AnandSingh777Accepted solution
Level 2
Mar 22, 2016 8:53 PM UTC

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.

8 replies

smacdonald2008
Level 10
Mar 11, 2016 11:25 PM UTC

Did your API code not activate CQ content under path? 

Translate
psjaison
Level 2
Mar 12, 2016 8:03 AM UTC

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

Translate
yan-kisen
Level 2
Mar 12, 2016 8:53 AM UTC

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

Translate
joerghoh
Adobe Employee
Adobe Employee
Mar 12, 2016 9:51 PM UTC

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

Jörg

Translate
kautuk_sahni
Level 9
Mar 14, 2016 4:42 AM UTC

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-manager.topic.html/forum__1bgb-i_have_to_activate10.html

//Programmatically activate pages in batches

 

I hope this would act as some help.

Thanks and Regards

Kautuk Sahni

Translate
Kautuk Sahni
Level 2
Mar 22, 2016 8:44 PM UTC

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.

Translate
Level 2
Mar 22, 2016 8:46 PM UTC

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.

Translate
AnandSingh777AuthorAccepted solution
Level 2
Mar 22, 2016 8:53 PM UTC

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.

Translate