Question

I've got an Ektron widget that has global settings and local settings which can override them. I need a way to programmatically read the global settings in the widget itself because depending on user input I need to reset the values to what is stored globally.

Is there an API method to read the global settings of a widget? I saw this question that shows how to read the instance-level settings by getting what is stored in the page XML, but that doesn't give me what is stored at the global level.

Load Ektron widget by ID?

Was it helpful?

Solution

I was able to accomplish this by using the Ektron.Cms.Widget.IWidgetTypeModel.FindByID() method.

var widgetTypeModel = new Ektron.Cms.Widget.WidgetTypeModel();
Ektron.Cms.Widget.WidgetTypeData widgetTypeData = null;
widgetTypeModel.FindByControlURL("Widget.ascx", out widgetTypeData);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top