After you implement new widgets, you must register them in the Sitefinity CMS toolbox. You do this by decorating the widget controller class with the ControllerToolboxItem attribute. This attribute defines the following properties of the widget:
The unique developer name of the toolbox section, in which you add the widget. This can be an existing section name. To find out the names of existing sections, go to the ~/Sitefinity/Administration/Settings/Advanced/Toolboxes folder and expand the PageControls » Sections nodes. For example, you can add your new widget to the ContentToolboxSection, defined as the constant ToolboxesConfig.ContentToolboxSectionName.
You can also create a new section and Sitefinity CMS will automatically create toolbox section with the name you have specified.
IMPORTANT: Required when developing MVC form fields.
For more information about new widgets, see Create widgets.
For an example of how to implement a Content Block widget controller, take a look at the GitHub repository.
Sitefinity CMS automatically detects all widget controllers that are decorated with the ControllerToolboxItem attribute and adds the corresponding item to the widget toolbox.
The following sample demonstrates how to decorate the widget controller with the ControllerToolboxItem attribute:
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important