Try Now
More in this section

Forums / Developing with Sitefinity / Get Widget List with API

Get Widget List with API

2 posts, 0 answered
  1. Nathalia
    Nathalia avatar
    25 posts
    16 Nov 2011
    02 Jun 2016
    Link to this post


       I need to get the list of custom widgets that I installed with API. How can I do?



  2. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    24 Apr 2017
    13 Jun 2016
    Link to this post

    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"));

    Stanislav Velikov
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
2 posts, 0 answered