allowedTemplates property is not working as expected (Experience Fragment)

Avatar

Avatar
Validate 10
Level 2
v1101
Level 2

Likes

4 likes

Total Posts

150 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 10
Level 2
v1101
Level 2

Likes

4 likes

Total Posts

150 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile
v1101
Level 2

24-08-2020

Hello Community - It looks like cq:allowedTemplates is not working in 6.5.x as expected. We are trying to restrict the templates for experience fragments. Tried updating the property in /content/experience-fragments folder but no luck. We see all static templates as well after updating the property. We just wanted to restrict all other templates while creating experience fragments. Can someone assist on this issue?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 50
Employee
Vish_dhaliwal
Employee

Likes

189 likes

Total Posts

356 posts

Correct reply

123 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
Vish_dhaliwal
Employee

Likes

189 likes

Total Posts

356 posts

Correct reply

123 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Vish_dhaliwal
Employee

24-08-2020

Hello,

 

You should set property inside /content/experience-fragments/<customer_folder>/cq:allowedTemplates instead of /content/experience-fragments/, otherwise the values will get overridden on SP upgrade.

Check section "Creating and Configuring a Folder for your Experience Fragments" here [1]

[1] https://docs.adobe.com/content/help/en/experience-manager-64/authoring/authoring/experience-fragment...

Regards,

Vishu

Answers (1)

Answers (1)

Avatar

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

392 likes

Total Posts

378 posts

Correct reply

148 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

392 likes

Total Posts

378 posts

Correct reply

148 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile
vanegi
Employee

25-08-2020

Hello @v1101,

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 String[] and set all available templates there, example:

/libs/cq/experience-fragments/components/experiencefragment/template

/conf/we-retail/settings/wcm/templates/experience-fragment(.*)?

 

You need to add experience fragment template in the allowed templates (cq:allowedTemplates = /conf/test-project/settings/wcm/templates/experience-fragment) instead of allowedPaths on the /content/experience-fragments/<project>.

 

Thanks!!