RegisterWidgetAttribute Constructor (String, String, Type, String) |
Registers a simple page builder widget using a view.
Namespace: Kentico.PageBuilder.Web.MvcAssembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 13.0.131
Syntax public RegisterWidgetAttribute(
string identifier,
string name,
Type propertiesType = null,
string customViewName = null
)
Parameters
- identifier
- Type: SystemString
Unique identifier of the widget definition. - name
- Type: SystemString
Name of the registered widget. - propertiesType (Optional)
- Type: SystemType
Type of the registered widget properties model. The type needs to implement the IWidgetProperties interface. - customViewName (Optional)
- Type: SystemString
Custom view name for the registered widget. If not specified, the default system view name in format '~/Shared/Widgets/_{identifier}' is used.
Remarks
Make sure to provide unique identifier for the widget definition from the start.
This identifier is used within the page configuration of widgets and any further change can lead to incorrect configuration load.
Consider specifying identifier in format 'CompanyName_ModuleName_WidgetName', e.g. 'Kentico_Content_ArticlesListWidget'.
Use this attribute when simple widget is being developed and no custom controller is needed.
See Also