Expand my Community achievements bar.

SOLVED

Editable templates best practices

Avatar

Level 3

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. 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.

View solution in original post

6 Replies

Avatar

Community Advisor

@pradeep8910 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.  

Avatar

Community Advisor

@pradeep8910 : 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-te...

thanks.

Avatar

Correct answer by
Community Advisor

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.

Avatar

Level 3

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. 

Avatar

Community Advisor

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

Avatar

Administrator

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