Expand my Community achievements bar.

SOLVED

Read Desing Dialog data from sling model

Avatar

Level 3

how can i read design dialog data for a component using sling model ? i'm using static template in my project .

1 Accepted Solution

Avatar

Correct answer by
Level 2

Get the reference to the currentStyle

@ScriptVariable 

private Style currentStyle;

Get the properties from currentStyle

String prop1= currentStyle.get("prop1", String.class);

View solution in original post

2 Replies

Avatar

Employee Advisor

You can use the "com.day.cq.wcm.api.designer.Design" API. More details at [1]

[1] Design ("The Adobe AEM Quickstart and Web Application.")

Avatar

Correct answer by
Level 2

Get the reference to the currentStyle

@ScriptVariable 

private Style currentStyle;

Get the properties from currentStyle

String prop1= currentStyle.get("prop1", String.class);