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

Adding a parsys statitcally in the sling:resourceType , does not allow users to add components to it.

Avatar

Level 3

hi ,

 

I have a scenario where I am using a static template to render content based on page properties selected by the user, However we need to add a parsys to the template, which allows authors to add editable components to it. 

I added the below code to add parsys at the end of the template rendering HTML ,


<div data-sly-resource="${ 'par' @ resourceType='wcm/foundation/components/parsys'}"></div>

 

However I am not able to add any components into the parsys for some reason. 

 

Can you help ?

 

Thanks,

Samiksha 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @samikshaa223429 ,

 

You need to allow the components, which you want to configure in the parsys. You can achieve it either by going to 'Design' mode in page in author instance or can set it via code as well. 

 

Notably, design mode is not offered on pages created using dynamic templates but in your case since you are using static template so it will be available.

 

Please check this old thread-

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/adding-parsys-from-code-in...

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @samikshaa223429 ,

 

You need to allow the components, which you want to configure in the parsys. You can achieve it either by going to 'Design' mode in page in author instance or can set it via code as well. 

 

Notably, design mode is not offered on pages created using dynamic templates but in your case since you are using static template so it will be available.

 

Please check this old thread-

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/adding-parsys-from-code-in...

Avatar

Level 3

hi Ritesh,

 

Can you provide some details on how to set it via code? 

I am not able to see the design mode option on the template i am currently using

Avatar

Level 3

hi Ritesh,

 

Thank you for the solution. I added the following node under /etc/designs/project_folder , and it worked . 

samikshaa223429_0-1623694621522.png

 

Thank you for the quick reply.