For the static template, the design is stored at /etc/designs/<my-site>/jcr:content/<page-component-name>/<component-name>
(if the page has a design path of /etc/designs/<my-site>) or/etc/designs/default/jcr:content/<page-component-name>/<component-name>
For editable template, design is stored at /conf/<
your-project
>/settings/wcm/policies.
So, In case of editable templates,only one template specific configuration(i.e. policies) per template can be there.
But, it is not the case with the static template, where more than one template-specific configurations (i.e. provide one separate design) can be associated with the template.
Template Name | Static Template | Editable Template | Design |
---|---|---|---|
T1 | /etc/designs/<site-name>/fr/jcr:content/landingpage | /conf/<project-name> /settings/wcm/policies/t1 | /etc/design/<project-name>/fr |
T1 | /etc/designs/<site-name>/us/jcr:content/landingpage | /conf/<project-name> /settings/wcm/policies/t1 | /etc/design/<project-name>/us |
How the above use case can be solved for the Editable template, wherein I want more than 1 policies (or config) per template depending on the designs.
Solved! Go to Solution.
When you create an editable template directory. You create a scope for templating. There, you will have a local list of policies. One can create as many policies as they want. Content Policies are meant to be reusable and portable. The content policy mechanism is leveraging the Conf Manager. This means that the policies can be located at many different places such as follows:
To have access to all the policies located under the previous paths at once, one must set the merge list property on the jcr:content under the local policies node such as:
/conf/<my-template-folder>/settings/wcm/policies/jcr:content/mergeList{Boolean}=true
tl;dr
The merging logic of the Conf Manager is as follows:
For information in this subject - see the AEM docs here:
Views
Replies
Total Likes
Hi smacdonald2008 ,
The Page Templates - Editableoes not tell how we solve this issue.
Regards,
Varun Rawat
Views
Replies
Total Likes
TO clarify - you believe there is missing information from the docs?
Views
Replies
Total Likes
We are looking into this as well.
Views
Replies
Total Likes
Let me know when I can get the update on the above.
Views
Replies
Total Likes
When you create an editable template directory. You create a scope for templating. There, you will have a local list of policies. One can create as many policies as they want. Content Policies are meant to be reusable and portable. The content policy mechanism is leveraging the Conf Manager. This means that the policies can be located at many different places such as follows:
To have access to all the policies located under the previous paths at once, one must set the merge list property on the jcr:content under the local policies node such as:
/conf/<my-template-folder>/settings/wcm/policies/jcr:content/mergeList{Boolean}=true
tl;dr
The merging logic of the Conf Manager is as follows:
Is this accurate?
We've tried to merge in policies from `/conf/global/settings/wcm/policies` in our site specific config (`/conf/<site>/settings/wcm/policies`) with `mergeList` set to true on the jcr:content node, and this evidently doesn't work.
We've also tried to merge in policies from `/apps/settings/wcm/policies` in our site specific config with `mergeList` set to true. This works initially, but once an author attempts to add a new policy, an exception is thrown and error popup is displayed:
org.apache.sling.api.resource.PersistenceException: Unable to create node at /conf/<site>/settings/wcm/policies/wci/components
After the exception is thrown, all policies from `/apps/settings/wcm/policies` are no longer merged into the site's policies.
Views
Replies
Total Likes
Hi patrickf14763699 ,
Can i associate different policies for the same Template based on different designs?
Views
Replies
Total Likes
Hi rawvarun,
No, the content policy is basically the equivalent of the design. Your are going to have one content policy where you previously had a design node with a static template.
Views
Replies
Total Likes
Based on locations specific site, i want to add a policy to the common template which already has common components.
Can this be done by adding multiple cq:policy be added to the template?
Views
Replies
Total Likes