Hello everyone,
I have following scenario:
Here my templates configuration
/conf/<mybrand>/settings/wcm
I created a page "MyStructurePage" with the structure-consumer-template and below it a page "MyContentPageA" with template content-consumer-templateA. Everything works.
/content/MyStructurepage/MyContantPageA
But now a template editor creates a new editable template "content-consumer-templateB" based on the "content-consumer-template-type". The editor allows the "content-consumer-templateB" template as a template below "structure-consumer-template" and "content-consumer-templateA" via cq:allowedTemplates property. But now below my pages "MyStructurePage" and "MyContentPageA" I can't create a page with template "content-consumer-templateB" because they were already create before the cq:allowedTemplate property was changed. I also can't work with wildcards for the cq:allowedTemplates property because I have to differ between business and consumer template and unfortunately the current structure of template names in my project (not a new setup) haven't a naming convention like in my constructed example.
Finally my question is: How to allow new editable templates for already created pages?
Thanks for helping me!
Andrea
--------
AEM 6.5 SP14
Solved! Go to Solution.
Views
Replies
Total Likes
@ajur -
AEM offers multiple properties to control the templates allowed under Sites. However, combining them can lead to very complex rules that are difficult to track and manage.
Therefore, Adobe recommends that you start simple, by defining:
only the cq:allowedTemplates
property
only on the site root
For an example, see We.Retail: /content/we-retail/jcr:content
The properties allowedPaths
, allowedParents
, and allowedChildren
can also be placed on the templates to define more sophisticated rules. However, when possible, it is much simpler to define further cq:allowedTemplates
properties on sub-sections of the site if there is a need to further restrict the allowed templates.
An additional advantage is that the cq:allowedTemplates
properties can be updated by an author in the Advanced tab of the Page Properties. The other template properties cannot be updated using the (standard) UI, so would need a developer to maintain the rules and a code deployment for every change.
Hi @ajur , I believe you can add the template under Advanced tab of page properties so that the template would be available to create child pages under that. Is this what you are looking for?
Thanks
Srikanth
Hi Srikanth,
yes, I know this feature. This maps to the property cq:allowedTemplates. But if I use this property I have to allow my newly created template for all pages which are already created. The question was how can I (automatically) allow my new template for a special set of pages.
Regards,
Andrea
@ajur -
AEM offers multiple properties to control the templates allowed under Sites. However, combining them can lead to very complex rules that are difficult to track and manage.
Therefore, Adobe recommends that you start simple, by defining:
only the cq:allowedTemplates
property
only on the site root
For an example, see We.Retail: /content/we-retail/jcr:content
The properties allowedPaths
, allowedParents
, and allowedChildren
can also be placed on the templates to define more sophisticated rules. However, when possible, it is much simpler to define further cq:allowedTemplates
properties on sub-sections of the site if there is a need to further restrict the allowed templates.
An additional advantage is that the cq:allowedTemplates
properties can be updated by an author in the Advanced tab of the Page Properties. The other template properties cannot be updated using the (standard) UI, so would need a developer to maintain the rules and a code deployment for every change.
Views
Likes
Replies