How to get all widgets configs ?

2116
5
Jump to solution
10-22-2015 04:58 AM
MathieuVILLEMONT1
Occasional Contributor

Theme controllers have access to all there widgets configs with method getAllConfigs();

Is there a way to do the same for all other widgets ?

Thanks

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Mathieu,

    In any widget you can use this.appConfig to get access to the main config.json.

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Mathieu,

    In any widget you can use this.appConfig to get access to the main config.json.

View solution in original post

MathieuVILLEMONT1
Occasional Contributor

Robert,

I think my problem is that I'm not in a widget when trying do do that so I don't have access to appConfig.

Thanks

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Mathieu,

   What are you in when you want to get access to the appConfig?

0 Kudos
MathieuVILLEMONT1
Occasional Contributor

I'm in an outside class.

What I did is create an instance of this class from within a widget and pass it the appConfig and it worked.

Thank you Robert.

0 Kudos
MathieuVILLEMONT1
Occasional Contributor

or better access it through the WidgetManager.

0 Kudos