Reading data stored in separate nodes design dialog

sreenu539

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.

AEM Design Dialog sightly

Accepted Solutions (1)

Accepted Solutions (1)

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)