Is Possible to hide a Dialog component depending on a Design Dialog Check box value? | Community
Skip to main content
Level 2
October 16, 2015
Solved

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

  • October 16, 2015
  • 3 replies
  • 942 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

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

3 replies

Sham_HC
Level 10
October 16, 2015

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.

PanasakiAuthor
Level 2
October 16, 2015

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.

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

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