Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Touch UI Allowed Templates

Avatar

Level 3

cq:allowedTemplates: "/conf/acme/settings/wcm/templates/(?!page-).*"

 

When I create a new page I see all templates in Touch UI. Classic UI works fine. 

How can I fix Touch UI?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

In a site structure, we should create a hierarchy of cq:Pages. Folders should not be used here

This would assure cq:allowedTemplates works as expected


Aanchal Sikka

View solution in original post

7 Replies

Avatar

Community Advisor

Hi @btaymaz 

 

If you want to allow only templates within your project i.e. acme then use the below rules:

 

cq:allowedTemplates of type String[] with value as /conf/acme/settings/wcm/templates/.*

 

Thanks!

Avatar

Community Advisor

Hi @btaymaz 

Which node you are setting this property?

 

Let's say you have a website as /content/acme and under acme you want to create pages using the template, then you need to add the property to /content/acme/jcr:content node.

 

I Just tried and it works!

Avatar

Community Advisor

@btaymaz It should be applied to the jcr:content node of type cq:PageContent. Should not be applied to the folder.

See the screenshot below:

 

asutosh_jena_0-1621532563534.png

 

Avatar

Correct answer by
Community Advisor

In a site structure, we should create a hierarchy of cq:Pages. Folders should not be used here

This would assure cq:allowedTemplates works as expected


Aanchal Sikka