Reading data stored in separate nodes design dialog

Avatar

Avatar
Validate 10
Level 4
sreenu539
Level 4

Likes

7 likes

Total Posts

158 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 20
View profile

Avatar
Validate 10
Level 4
sreenu539
Level 4

Likes

7 likes

Total Posts

158 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 20
View profile
sreenu539
Level 4

17-09-2020

design-dialog-nodes.pngHi,

 

I know to read design dialog values through for example: ${currentStyle.titleType} 

 

But how do you read design dialog data stored as separate nodes below component policy node. 

 

I have a multi field values stored as item nodes below component policy node.

 

I am trying to read it using data sly list ${curentStyle.link} which does not work as link is a child node below component policy node.

i appreciate any help, thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

586 likes

Total Posts

734 posts

Correct reply

246 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

586 likes

Total Posts

734 posts

Correct reply

246 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile
Vijayalakshmi_S
MVP

17-09-2020

Hi @sreenu539,

For getting policy programmatically, we need to make use of ContentPolicyManager and ContentPolicy API (We will be able to gain access to ContentPolicyManager from ResourceResolver)

ContentPolicyManager cntPolicyMgr = rescResolver.adaptTo(ContentPolicyManager.class);

Go through the methods exposed by the API and use accordingly. 

We will be able to get the policy and its properties (properties on the policy node). For accessing child nodes under policy node, should be either Resource or Node API. 

ContentPolicyManager API:

ContentPolicy API:

Answers (0)