Publish pages when CA uses Editable Template -> Publish Template | Community
Skip to main content
Level 2
November 23, 2023

Publish pages when CA uses Editable Template -> Publish Template

  • November 23, 2023
  • 3 replies
  • 1581 views

Hello Everyone,

 

I have project requirement which is when content author modifies the editable template structure/content/policies/anything and click publish template(below screenshot).  It should publish automatically all the corresponding pages to publisher and invalidate dispatcher.

 

 

 

I want to implement this solution in AEM. How do i implement this one in AEM 6.5 as CS ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Preetpal_Bindra
Community Advisor
Community Advisor
November 23, 2023

I'm not aware of an AEM ootb feature that provides this feature. If it had been AEM 6.5 I would have suggested using dispatcher flush rules (link below).

However, that feature is not compatible with aem as a cloud service. 

 

One custom approach could be using the AEM replication API within a custom servlet with aem as a cloud service, which of course can be customized to listen for the template publication event and replicate pages that you want using the replication API.

 

https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-flush-rules/index.html

 

Replication API example-

https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/operations/replication.html%3Flang%3Den&ved=2ahUKEwi_lKaAo9mCAxUkj2oFHddTBLIQFnoECAsQAQ&usg=AOvVaw1lDv8C5OYn2YPrg-XkO_K6

kautuk_sahni
Community Manager
Community Manager
November 23, 2023

@sreekanthsuggu  Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni
Level 2
November 25, 2023

Hello @kautuk_sahni ,

 

Thanks for reply. I didn’t find solution anywhere and still looking for solution to implement 

 

Thanks

sree

arunpatidar
Community Advisor
Community Advisor
November 23, 2023

Hi @sreekanthsuggu 
Why do you need to publish all the pages? Just to invalidate the cache?

Arun Patidar
Level 2
November 23, 2023

Hello @arunpatidar , 

 

Thanks for reply .. 

 

Can you explain what is the event handler/service/etc needs to write when CA clicks on "Publish template" in editable template. 

 

Also i am thinking to use SCD to invalidate the cache. is it ok to use ?

 

Level 2
December 5, 2023

Thanks @arunpatidar and let me try this solution.


Hello @arunpatidar , I have created "ResourceChangeListener" and mapped with list of templates(what you recommend) but it's not triggering when CA clicks on publish template in editable templates it works only when template is modified .

 

what to do ?