+1-888-365-2779
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
    Registered:
    16 Nov 2011
    02 Jun
    Link to this post

    Hi,

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

     

    Thanks!

  2. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    22 Sep 2016
    13 Jun
    Link to this post
    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"));
                }

    Regards,
    Stanislav Velikov
    Telerik
     
    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