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 through Sitefinity's advanced settings

To register a widget using Sitefinity CMS backend:

  1. Click Administration » Settings.
    The Basic Settings page appears.
  2. Click Advanced link.
    The Settings page appears.
  3. In the left pane, click Toolboxes » Toolboxes.
  4. 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. Click the section in the navigation tree.
    2. Click Tools.
      A list of all widgets in the this section is displayed.
    3. Click Create new button.

    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.
  5. 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 is 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.

  6. 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:
How To
Tutorials: Custom widgets

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.

Was this article helpful?