While creating an experience fragment,other templates (not only experience fragment) are also visible when we set other templates (cq:allowedpaths) set to /content(/.*)?
Is this product issue in AEM 6.5 or expected behaviour.
Note : I have added only experience fragments paths in cq:allowedtemplate property.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
If you dont define cq:allowedTemplates at /content/experience-fragments. then what AEM would do will list all the templates matching the regEx i.e. /content(/.*) . As experience-fragments is under /content, the regEx matches and the templates get displayed. The rendering logic can be found via this diagram
As I can check in the Adobe documentation, it is mentioned that combining both cq:allowedTemplates and allowedPaths is not recommended and only cq:allowedTemplates should be used. combining them can lead to very complex rules that are difficult to track and manage.
Also, in AEM 6.4.3 combination of both was working but it was a product bug and that has been corrected in AEM 6.4.4 and now it is only recommended to use cq:allowedTemplates
For more information on this please check the below document also:
https://helpx.adobe.com/experience-manager/6-4/sites/developing/using/templates.html#main-pars_title...
So, I would now recommend you to please use the cq:allowedTemplate property on the folder level as this is Adobe recommended property.
Allowed templates for experienced fragments should be set for XF root folder, for example at /content/experience-fragments.
You need to define cq:allowedTemplates property as Sring[] and set all available templates there, example:
/libs/cq/experience-fragments/components/experiencefragment/template
/conf/we-retail/settings/wcm/templates/experience-fragment(.*)?
If you dont define cq:allowedTemplates at /content/experience-fragments. then what AEM would do will list all the templates matching the regEx i.e. /content(/.*) . As experience-fragments is under /content, the regEx matches and the templates get displayed. The rendering logic can be found via this diagram
Hello Rahul,
To make XF template available in the touch UI for creating experience fragments, you need to add experience fragment template in the allowed templates(cq:allowedTemplates = /conf/test-project/settings/wcm/templates/experience-fragment-web-variation) instead of allowedPaths on the /content/experience-fragments/<project>.
And then when you go to AEM start screen, http://localhost:4504/aem/start.html, click experience fragment then select the test-project folder and click create, XF template is available for selection.
Thanks,
Vaishali
Views
Likes
Replies