Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Imran Khan
Imran KhanAccepted solution
Community Advisor
February 28, 2024

@sindhusr 

You can also use cq:allowedPaths property on the template

So your template will not be found while you create pages under /content/project/en/xyz/abc.

allowedPaths="[/content/entities(/.*)?]"

 

On the content the template must be allowed (using the cq:allowedTemplates property as show below

cq:allowedTemplates="[/conf/practice/settings/wcm/templates/(?!xf-).*]"

allowedParents
Regular expression patterns to determine the path(s) of components that are allowed as parent components.

allowedParents="[/apps/powerade/templates/homepage, /apps/powerade/templates/contentpage]" (don't work)

 allowedChildren
Regular expression patterns to determine the path(s) of components that are allowed as child components.

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. 

allowedChildren="[/apps/powerade/templates/contentpage]"

2 replies

SureshDhulipudi
Community Advisor
Community Advisor
February 28, 2024

 allowedPaths will work with Editable templates.

The allowedPaths property is not directly available in the page policy of an editable template in AEM. The control of where an editable template can be used is typically managed through the template's cq:allowedTemplates property on the page component.

 

You can configure in your Page / content root page properties Advanced Tab

 

Translate
Imran Khan
Community Advisor
Imran KhanCommunity AdvisorAccepted solution
Community Advisor
February 28, 2024

@sindhusr 

You can also use cq:allowedPaths property on the template

So your template will not be found while you create pages under /content/project/en/xyz/abc.

allowedPaths="[/content/entities(/.*)?]"

 

On the content the template must be allowed (using the cq:allowedTemplates property as show below

cq:allowedTemplates="[/conf/practice/settings/wcm/templates/(?!xf-).*]"

allowedParents
Regular expression patterns to determine the path(s) of components that are allowed as parent components.

allowedParents="[/apps/powerade/templates/homepage, /apps/powerade/templates/contentpage]" (don't work)

 allowedChildren
Regular expression patterns to determine the path(s) of components that are allowed as child components.

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. 

allowedChildren="[/apps/powerade/templates/contentpage]"
Translate