Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

While creating an experience fragment,other templates (not only experience fragment) are also visible AEM 6.5

rahuldhingra
Level 1
Level 1

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.

AEM 6.5 Experience Fragments
1 Accepted Solution
manising
Correct answer by
Level 3
Level 3

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

 

chlimage_1-176

View solution in original post

4 Replies
surabhikatiyar
Employee
Employee

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.

berliant
Employee
Employee

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(.*)?

manising
Correct answer by
Level 3
Level 3

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

 

chlimage_1-176

View solution in original post

vanegi
Employee
Employee

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>.

 

vanegi_0-1592145857564.png

 


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