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

Is Possible to hide a Dialog component depending on a Design Dialog Check box value?

Avatar

Level 2

Good morning,

I have a requirement to manage the attributes shown in the dialog by checkboxes in the design dialog, is this possible?

Thank you.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Miguel,

Look at method CQ.utils.WCM.getStyleOptions  which makes a call to servlet [1] with selector as style that returns configuration done in design mode. You might follow the same by creating a servlet that return design dialog check box value.

[1]   http://<host>:<port>/<path of resource>style.json/layouts

Thanks,

Sham

View solution in original post

3 Replies

Avatar

Level 10

Yes. For implementation reference take a look at the out of the box column control component where in design mode you specify the column control  format & in dialog component you get respective layout options.

Avatar

Level 2

Sham thank you for your response.

I have worked with the configuration of the CSS class to use, as the column control does.

The problem is I do not know how move this solution to my case where the hide property of a component in the dialog depends on a checkbox component value inside of the design dialog.

I have been seeing the CQ.utils.WCM.getDesign method, to retrieve the design object but from there I do not know how continue.

Do you have any tip?

Thanks.

Miguel.

Avatar

Correct answer by
Level 10

Hi Miguel,

Look at method CQ.utils.WCM.getStyleOptions  which makes a call to servlet [1] with selector as style that returns configuration done in design mode. You might follow the same by creating a servlet that return design dialog check box value.

[1]   http://<host>:<port>/<path of resource>style.json/layouts

Thanks,

Sham