PortalHelperAddNewWidget Method |
Adds the new widget to the page and returns its instance.
Namespace: CMS.PortalEngine.Web.UIAssembly: CMS.PortalEngine.Web.UI (in CMS.PortalEngine.Web.UI.dll) Version: 13.0.131
Syntax public static WebPartInstance AddNewWidget(
int widgetId,
string zoneId,
WidgetZoneTypeEnum zoneType,
bool isLayoutZone,
PageTemplateInstance templateInstance,
DataRow row = null
)
Parameters
- widgetId
- Type: SystemInt32
The widget id - zoneId
- Type: SystemString
The zone id - zoneType
- Type: CMS.PortalEngineWidgetZoneTypeEnum
Type of the widget zone - isLayoutZone
- Type: SystemBoolean
Indicates whether the zone is a layout zone - templateInstance
- Type: CMS.PortalEnginePageTemplateInstance
The template instance - row (Optional)
- Type: System.DataDataRow
The data of the new widget
Return Value
Type:
WebPartInstanceSee Also