Expand my Community achievements bar.

SOLVED

Allow Template to be used in different Sites

Avatar

Level 3

I have created templates in different site folder and wanted to use it on another site of folder which property I have to use Do i have to add property in template or a page?.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

You need to add a property to root where you want to allow those templates

Example

 

cq:allowedTemplates="[/conf/(.*)/settings/wcm/templates/experience-fragment(.*)?,/conf/(.*)/settings/wcm/templates/xf(.*)?]" 

Or

cq:allowedTemplates="[/conf/wknd/settings/wcm/templates/landing-page-template,/conf/wknd/settings/wcm/templates/article-page-template,/conf/wknd/settings/wcm/templates/content-page-template,/conf/wknd/settings/wcm/templates/adventure-page-template]"

 

https://github.com/adobe/aem-guides-wknd/blob/4d678ee8079c86be639036f7747f8201a434aa97/ui.content/sr... 



Arun Patidar

View solution in original post

2 Replies

Avatar

Community Advisor

You can add template path in Allow Template properties of your site hierarchy root page

 

Click on Site hierarchy-> Click Properties -> Go to Advance tab-> Go to Template Setting Section-> Allowed Templates -> <Add path of the different folder which you wanna use>

Save and close

Then Click create page. You can see template(added above).

Avatar

Correct answer by
Community Advisor

Hi,

You need to add a property to root where you want to allow those templates

Example

 

cq:allowedTemplates="[/conf/(.*)/settings/wcm/templates/experience-fragment(.*)?,/conf/(.*)/settings/wcm/templates/xf(.*)?]" 

Or

cq:allowedTemplates="[/conf/wknd/settings/wcm/templates/landing-page-template,/conf/wknd/settings/wcm/templates/article-page-template,/conf/wknd/settings/wcm/templates/content-page-template,/conf/wknd/settings/wcm/templates/adventure-page-template]"

 

https://github.com/adobe/aem-guides-wknd/blob/4d678ee8079c86be639036f7747f8201a434aa97/ui.content/sr... 



Arun Patidar