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

cq:allowedTemplates is not working with experience fragment in AEM 6.4.8


Level 4

I see all my static templates while creating experience fragment. Checked the property cq:allowedTemplates on /content/experience-fragments, it contains




Only conf and libs templates should be shown while creating template as per the above config but I am seeing all the static template that resides inside /apps folder. Basically I would want to stop showing static templates that resides on /apps folder. Is there any other config to make this happen?

5 Replies


Community Advisor


Try to use allowedPath property-


EM 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.


Level 4

Thanks for your reply. allowedPath is not working at /content/experience-fragments level but it worked when I change regulr expression at the static tempalte level. making this change at 20+ template may not be a correct approach. Why cq:allowedTemplates & allowedPath  props are not working at ef level? Is this a bug?


Level 5

@Anderson_Hamer - I am also facing the similar issue. Can you please let me know if making the changes at static template level fix the issues with the allowed Templates policy at /content/experience-fragments level? if so, can you tell me what should I use in static template allowedPath (Regular Expression)?


Community Advisor

I guess it is a product bug. Issue exists since 6.4.4. Adobe had made some changes in 6.4.4 as per SP release notes and it would have impacted.
Ideally it should show only the XF templates which is configured in cq:allowedTemplates not the static page templates which is mentioned with allowedPaths-String-/content(/.*)? property