Widget internals and API

Database tables

Database tableDescription

Stores records representing widget categories.

CMS_WidgetStores records representing widgets and their configuration.
CMS_WidgetRoleStores relationships between widgets and roles. Each entry in this table indicates that a specific widget can be used by users in a given role.


Widget instance storage

The system stores the content of widget zones (widget instances) in the database. The location depends on the type of the widget content:

Widget content typeDescriptionStorage
Default zone contentThe default widget content of all zone types, prepared by page developers on the Design tab.In XML format in the PageTemplateWebParts column of the CMS_PageTemplate table.
Editor zone contentWidget instances placed onto individual pages by page editors on the Page tab of the Pages application.In XML format in the DocumentWebParts column of the CMS_Document table.
Group zone contentWidget instances placed onto pages by group administrators on the live site.In XML format in the DocumentGroupWebParts column of the CMS_Document table.
Dashboard and user zone contentWidget instances in personalized user and dashboard widget zones. The content depends on the current context (user and site). In the CMS_Personalization table.
Inline widgets

Widgets placed into the text content of:

  • Editable regions on pages (Page tab or in on-site editing mode)
  • Page fields (Form tab)

As control macro expressions:

  • Editable regions - DocumentContent column of the CMS_Document table
  • Page fields - the table that stores pages of the given type (for example CONTENT_News for news pages)

API classes

CMS_WidgetCategory table API
WidgetCategoryInfoCMS.PortalEngineRepresents individual widget categories.
WidgetCategoryInfoProviderProvides management functionality for widget categories.
CMS_Widget table API
WidgetInfoCMS.PortalEngineRepresents individual widget objects.
WidgetInfoProviderProvides management functionality for widgets.
CMS_WidgetRole table API
WidgetRoleInfoCMS.PortalEngineRepresents relationships between widgets and roles (permissions).
WidgetRoleInfoProviderProvides management functionality for widget-role relationships.
CMS_Personalization table API

Represents personalized versions of pages (for a specific site and user).

PersonalizationInfoProviderProvides management functionality for personalization objects.
Other classes
WebPartInstanceCMS.PortalEngineAllows you to work with widget instances.
WebPartZoneInstanceAllows you to work with web part (widget) zones.