Register a new widget in the backend

In addition to the standard widgets, you can use your own widgets. Before you can use them, you must register them in the widget toolbox in Sitefinity’s backend.

You can register a widget through Sitefinity’s advanced settings UI or through Sitefinity’s configuration file.

Register a new widget in the backend

To register a widget using Sitefinity CMS backend:

  1. Click Administration » Settings » Advanced.
    The Advanced Settings page appears.
  2. In the tree view on the left, click Toolboxes » Toolboxes.
  3. Depending on what kind of widget you want to add, choose one of the following:
    Type of widget
    Procedure
    Page widgets
    These are widgets displayed in page editing mode.
    Click PageControls » Sections.
    1. In the tree view on the left, click the section where you want to add your widget.
    2. Click Tools.
      A list of all widgets in the this section is displayed.
    3. Click Create new button.

    You can create a new section or add the widget to an existing one. To create a new section and add the widget to the section:

    1. Above the list of all sections, click Create new button.
    2. Fill out the Sections form and click Save changes.
      For more information about the fields in the form, see the field descriptions below each field.
    3. Click the section you have created.
    4. Click Tools » Create new.

    The widget registration form is displayed.

    Form widgets
    These are widgets displayed when you create a form with the Forms module.
    1. Click FormControls » Sections » Common » Tools.
      A list with all form widgets is displayed.
    2. Click Create new button.
      The widget registration form is displayed.
  4. Fill out the Tools form:
    1. In Control CLR type or virtual path, enter one of the following:
      • When registering a custom widget built into an assembly, enter the fully qualified type name of the widget.
        For example: SitefinityWebApp.MyFolder.MyCustomWidget, SitefinityWebApp
      • When registering a user widget, enter the virtual URL of the user widget
        For example: ~/MyFolder/MyUserWidget.ascx
    2. In Name, enter a developer name for the widget.
      You can use it to access the widget using the API later.
    3. For Title, enter the title that will appear in the toolbox.

      NOTE: Make sure you enable your widget to be displayed in the frontend. For more information, see Enable and disable a widget.

  5. When finished, click Save changes.
    The widget is registered in the toolbox and can be used in Sitefinity.

For more information about creating widgets, see Create a new custom widget.

Register a widget through the configuration file

When you use the advanced settings in Sitefinity CMS backend, the settings are persisted in the configuration. By default, these are stored as physical files in folder ~/App_Data/Sitefinity/Configuration of your web project.

Instead of using the UI to register a widget, you can edit the configuration files. The toolbox configurations have their own separate file, named ToolboxesConfig.config.

Perform the following:

  1. To register a new widget, open the ToolboxesConfig.config file.
  2. Find the section you want to use or create a new section under the <sections> element.
  3. Depending on the type of widget, register it using the appropriate code pattern:
  4. Save the file and restart the application.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

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.

Web Security for Sitefinity Administrators

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.

Foundations of Sitefinity ASP.NET Core Development

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.

Was this article helpful?