Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

AEM Editable Templates, how to add properties such as allowedChildren, allowedParents, allowedPaths

Avatar

Level 4

I have seen documentation that only explains allowedChildren, allowedParents, allowedPaths as properties can be set on STATIC templates. How about editable templates. Where can I add these properties? Can it be done in Touch UI?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hey @AEMWizard,

I've tested this out myself, and It seems like the "allowedChildren" property is the only respected rule for editable templates, with templates that exist under the default repository structure of /conf/my-site/settings/wcm/templates/* (cq:template) nodes. Even the latest service pack 6.4.3.7, "allowedParents" and "allowedPaths" is not working as expected.

What does the "allowedChildren" property under the cq:Template node do? The value set should be the paths of a template that is allowed to be a child of this template.

If you wish to use editable templates with the "allowedChildren", follow the instructions below. 

  1. Configure cq:allowedTemplates:
    Within CRX/DE, In your site content structure of /content/my-site/jcr:content, add property of String[] cq:allowedTemplates to "/conf/my-site/settings/wcm/templates/.*". This will enable and allow all editable templates under the set path to be used on page creation under the path of /content/my-site. Since "allowedParents" and "allowedPaths" are not working as expected for editable templates, this may be the only way to enable editable templates for your site structure.
  2. Configure "allowedChildren":
    Within CRX/DE under /conf/my-site/settings/wcm/templates/templateA (should be a cq:Template), add the property of String[] allowedChildren to "PATH_OF_YOUR_TEMPLATE". The value set should be the paths of a template that is allowed to be a child of this template.

I hope this helps.

View solution in original post

0 Replies

Avatar

Correct answer by
Community Advisor

Hey @AEMWizard,

I've tested this out myself, and It seems like the "allowedChildren" property is the only respected rule for editable templates, with templates that exist under the default repository structure of /conf/my-site/settings/wcm/templates/* (cq:template) nodes. Even the latest service pack 6.4.3.7, "allowedParents" and "allowedPaths" is not working as expected.

What does the "allowedChildren" property under the cq:Template node do? The value set should be the paths of a template that is allowed to be a child of this template.

If you wish to use editable templates with the "allowedChildren", follow the instructions below. 

  1. Configure cq:allowedTemplates:
    Within CRX/DE, In your site content structure of /content/my-site/jcr:content, add property of String[] cq:allowedTemplates to "/conf/my-site/settings/wcm/templates/.*". This will enable and allow all editable templates under the set path to be used on page creation under the path of /content/my-site. Since "allowedParents" and "allowedPaths" are not working as expected for editable templates, this may be the only way to enable editable templates for your site structure.
  2. Configure "allowedChildren":
    Within CRX/DE under /conf/my-site/settings/wcm/templates/templateA (should be a cq:Template), add the property of String[] allowedChildren to "PATH_OF_YOUR_TEMPLATE". The value set should be the paths of a template that is allowed to be a child of this template.

I hope this helps.

Avatar

Community Advisor

Arun,

Arun, I added "allowedPaths" to the/conf/my-site/settings/wcm/templates/templateA/initial/jcr:content (cq:PageContent); does not work. allowedParents" and "allowedPaths" is not working as expected for editable templates.

Avatar

Level 3

Are there any updates on how to set allowedChildren for Editable Templates? Thanks.