Editable templates best practices | Community
Skip to main content
Level 2
February 22, 2024
Solved

Editable templates best practices

  • February 22, 2024
  • 4 replies
  • 1533 views

We are planning to move from static templates to editable templates. As a best practice should we commit component content policy's that are defined for each components in code base or keep it editable for the authors. What challenges do we face with either approach. 

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 BrianKasingli

Yes, As a best practice, initially during the development phase, you should store the policies in ui.content, making sure that the /conf folder is mode="merge". This will setup and help future developers build a base project on their local machines. Ideally during the development of your editable templates, your ui.content.../conf should be closely identical.

Since in your AEMaaCS service has access to the crx/de, on every code deployment I would delete the /conf/my-app/...templates and policies, as developers are continuously working on this. 

Now moving into Staging, you cannot push any new changes to /conf anymore (after the first push), and would need manage the policies via the AEM template editor UI. 

Now moving to production, preferred, you'd need to content package the /conf/my-app, into the production environment.

4 replies

Imran Khan
Community Advisor
Community Advisor
February 22, 2024

@pradeep_varmape Yes, we should commit component policies through code in terms of which component allow as part of which template. At the same time we can also define policies for component style system.

Overall, editable template component policies empower authors to customize and manage the behavior and appearance of components within AEM templates, enabling efficient and flexible content creation and management workflows. They play a crucial role in ensuring consistency, quality, and usability in the authoring experience within AEM environments.

Keeping it all may create issues if we don't want to drag drop certain components on particular templates.  

Kamal_Kishor
Community Advisor
Community Advisor
February 22, 2024

@pradeep_varmape : Please refer this as well. It has slightly different views on if the policy or templates itself should be part of your codebase: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/maintenance-of-editable-templates/m-p/421980

thanks.

BrianKasingli
Community Advisor and Adobe Champion
BrianKasingliCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
February 22, 2024

Yes, As a best practice, initially during the development phase, you should store the policies in ui.content, making sure that the /conf folder is mode="merge". This will setup and help future developers build a base project on their local machines. Ideally during the development of your editable templates, your ui.content.../conf should be closely identical.

Since in your AEMaaCS service has access to the crx/de, on every code deployment I would delete the /conf/my-app/...templates and policies, as developers are continuously working on this. 

Now moving into Staging, you cannot push any new changes to /conf anymore (after the first push), and would need manage the policies via the AEM template editor UI. 

Now moving to production, preferred, you'd need to content package the /conf/my-app, into the production environment.

Level 2
February 22, 2024

thanks for the reply, would it make sense to consolidate the component policy's once everything is live in production and clean up the duplicate policy's if there are any across templates. 

Imran Khan
Community Advisor
Community Advisor
February 22, 2024

@pradeep_varmape Yes, manually we can make changes and delete duplicate policies.

kautuk_sahni
Community Manager
Community Manager
February 28, 2024

@pradeep_varmape  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