Programatically Generate/Copy Editable Templates and Policies | Community
Skip to main content
rajeevy89244319
March 15, 2020
Solved

Programatically Generate/Copy Editable Templates and Policies

  • March 15, 2020
  • 1 reply
  • 3758 views

I have 2 use cases:

1. Programmatically create copy of existing Editable Template and its policies

2. Programmatically generate new Editable Template based on Template Type.

 

Could you please suggest which APIs/classes can be used to achieve this. I looked into TemplateManager but it does not seem to be having methods to copy the templates.

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 Suraj_Kamdi

@rajeevy89244319 Currently, there is no API available to create the editable templates programmatically. 

To create a copy of existing editable templates and policies, you just need to update the .content.xml file as per your requirement and template type

or else you can simply build the editable templates inside /conf folder with the help of CRXDE.

Please let me know if you need any help. I am happy to help 🙂 

1 reply

Suraj_Kamdi
Community Advisor
Suraj_KamdiCommunity AdvisorAccepted solution
Community Advisor
March 16, 2020

@rajeevy89244319 Currently, there is no API available to create the editable templates programmatically. 

To create a copy of existing editable templates and policies, you just need to update the .content.xml file as per your requirement and template type

or else you can simply build the editable templates inside /conf folder with the help of CRXDE.

Please let me know if you need any help. I am happy to help 🙂 

rajeevy89244319
March 16, 2020
I want to copy the templates using api to a new area and also wants the policy references to be updated. Seems like it is not possible right now.