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

How to define policy for nested container component

Avatar

Avatar
Validate 1
Level 1
johns56194565
Level 1

Like

1 like

Total Posts

10 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 1
johns56194565
Level 1

Like

1 like

Total Posts

10 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile
johns56194565
Level 1

07-01-2021

I need to understand with editable templated how can we define the policy for a component that has a nested parsys and this component can be put on a page multiple times like If i have a component called testComponent it has a container in template using parsys:

<div data-sly-resource="${ 'blockParsys' @ resourceType='wcm/foundation/components/parsys'}" ></div> Then is component is put on a page multiple times. it will generate content structure like this:

 

  • my-page
    • jcr:content
      • root
        • my-component ( resourceType: apps/myProject/components/testComponent)
        • my-component_xxxxxxxxx ( resourceType:apps/myProject/components/testComponent)

 

The policy could be set for the first component dragged but does not remain for the following components. Can someone please help me with a sample component that have a parsys with policy set and could be dragged on the page multiple times.

 

@ChitraMadan  @Arun_Patidar @BrianKasingli 

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,428 likes

Total Posts

3,300 posts

Correct Reply

937 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,428 likes

Total Posts

3,300 posts

Correct Reply

937 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

07-01-2021

you can define template include policy like

 

<testComponent jcr:primaryType="nt:unstructured">
	<parsys
		cq:policy="myapp/core/components/content/testComponent/policy_parsys"
		jcr:primaryType="nt:unstructured"
		sling:resourceType="wcm/core/components/policies/mapping"/>
</testComponent>