If I have two templates A and B whenever I create a page under template A but it should always use template B how should I achieve that?
Solved! Go to Solution.
Views
Replies
Total Likes
You can use cq:allowedTemplates property to allow specific templates to be visible under a path.
You can set this property on /conf/project/settings/wcm/templates/template-a/initial/jcr:content of the Template A. So once the author creates a page using Template A, the page will have Template B as cq:allowedTemplates property and Authors can choose only Template B to create a page under it.
Reference : /content/we-retail/jcr:content
Its quite a strange use case. Are both templates identical ?
You can use cq:allowedTemplates property to allow specific templates to be visible under a path.
You can set this property on /conf/project/settings/wcm/templates/template-a/initial/jcr:content of the Template A. So once the author creates a page using Template A, the page will have Template B as cq:allowedTemplates property and Authors can choose only Template B to create a page under it.
Reference : /content/we-retail/jcr:content
@Sachin_Arora_ Thank you for the answer it worked
You can use cq:allowedTemplates property to define specific templates. Set property in a way that only Template B is available for use.
Hi,
Please check https://experienceleague.adobe.com/docs/experience-manager-64/developing/platform/templates/template...
These properties allows you to set some contract of structure of pages in you project. For example: you have 3 templates (and corresponding pages with this templates):
Then in siteadmin, you will be able to create:
Hi @arunpatidar
Do you set the cq:allowedTemplates, allowedParents and allowedChlidren on the jcr:content node under context.xml in the initial folder (arrow on top) or context.xml on the root folder (arrow at the bottom)?
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies