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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

allowedTemplates property is not working as expected (Experience Fragment)

v1101
Level 5
Level 5

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?

1 Accepted Solution
Vish_dhaliwal
Correct answer by
Employee
Employee

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

View solution in original post

9 Replies
Vish_dhaliwal
Correct answer by
Employee
Employee

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

View solution in original post

v1101
Level 5
Level 5
@Vish_dhaliwal - Thanks for the inputs.I have already tried this suggestion but it is not working. Do you think of any other solution ?
Vish_dhaliwal
Employee
Employee
I just tried the same steps in 6.5.5 and it works for me.
Vish_dhaliwal
Employee
Employee

I just tried the same steps in 6.5.5 and it works for me. Steps:

1. Create new folder at path http://localhost:6502/aem/experience-fragments.html/content/experience-fragments/ 

2. Select the folder and click on properties.

3. Added "/conf/(.*)/settings/wcm/templates/experience-fragment(.*)? in Allowed properties.

4. Only XF templates are visible in createxfwizard. 

 

Screenshot at Aug 24 22-19-31.png

 

v1101
Level 5
Level 5

@Vish_dhaliwal- I did those exact steps but I still see all the templates while creating a new experience fragment. The policy is updated in crx (cq:allowedTemplates) but while creating a new xf it is not getting applied.

I am using 6.5.0

Vish_dhaliwal
Employee
Employee
That's odd. Can you give it a try with latest service pack? If it does not work, please raise a support case so that we can investigate further.
vanegi
Employee
Employee

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