How do I programmatically Activate tree ? | Community
Skip to main content
Level 2
March 11, 2016
Solved

How do I programmatically Activate tree ?

  • March 11, 2016
  • 8 replies
  • 5309 views

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.
Best answer by AnandSingh777

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
March 11, 2016

Did your API code not activate CQ content under path? 

psjaison
Level 2
March 12, 2016

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

yan-kisen
Level 2
March 12, 2016

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

joerghoh
Adobe Employee
Adobe Employee
March 12, 2016

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

Jörg

kautuk_sahni
Community Manager
Community Manager
March 14, 2016

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

Kautuk Sahni
Level 2
March 22, 2016

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.

Level 2
March 22, 2016

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.

AnandSingh777AuthorAccepted solution
Level 2
March 22, 2016

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.