Widget internals and API

Database tables

Database table

Description

CMS_WidgetCategory

Stores records representing widget categories.

CMS_Widget

Stores records representing widgets and their configuration.

CMS_WidgetRole

Stores 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 type

Description

Storage

Default zone content

The 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 content

Widget 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 content

Widget 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 content

Widget 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

API classes

Class

Namespace

Description

CMS_WidgetCategory table API

WidgetCategoryInfo

CMS.PortalEngine

Represents individual widget categories.

WidgetCategoryInfoProvider

Provides management functionality for widget categories.

CMS_Widget table API

WidgetInfo

CMS.PortalEngine

Represents individual widget objects.

WidgetInfoProvider

Provides management functionality for widgets.

CMS_WidgetRole table API

WidgetRoleInfo

CMS.PortalEngine

Represents relationships between widgets and roles (permissions).

WidgetRoleInfoProvider

Provides management functionality for widget-role relationships.

CMS_Personalization table API

PersonalizationInfo

CMS.DocumentEngine

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

PersonalizationInfoProvider

Provides management functionality for personalization objects.

Other classes

WebPartInstance

CMS.PortalEngine

Allows you to work with widget instances.

WebPartZoneInstance

Allows you to work with web part (widget) zones.