Get Widget List with API
Hi,
I need to get the list of custom widgets that I installed with API. How can I do?
Thanks!
Hi,
Loop through all registered widgets and find those that are not installed from assembly with name Telerik.Sitefinity.* . To check this in the UI go to Administration->Settings->Advanced->Toolboxes->Toolboxes->PageControls->Sections.
To query those refer to the API for working with this configuration section. Sample here.
var config = ConfigManager.GetManager().GetSection<ToolboxesConfig>();
var pageControlsSection = config.Toolboxes[
"PageControls"
];
var allSections = pageControlsSection.Sections;
foreach
(var section
in
allSections)
var builtInWidgets = section.Tools.Where<ToolboxItem>(t => t.ControlType.StartsWith(
"Telerik.Sitefinity"
));