IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
If you have build a custom Sitefinity CMS widget and a designer for it, it is either part of a module or you a standalone widget. In this case, the template cannot be edited through the user interface in the way built-in templates can. This tutorial explains how to manage the widget templates through the control designer.
For more information, see:
To manage the custom template through the widget designer, perform the following:
The template contains the UI of the designer. It is represented by an .ascx file built as an embedded resource. To manage widget templates, you must use the TemplateSelector control provided by Sitefinity CMS.
.ascx
TemplateSelector
SAMPLE: For more information about the template of the designer, see CustomWidgetDesigner.ascx in Sitefinity documentation-samples on GitHub.
CustomWidgetDesigner.ascx
NOTE: Mark the template as embedded resource by opening the Properties pane and setting the BuildAction field to EmbeddedResource.
To create the class for the designer, perform the following:
ControlDesignerBase
LayoutTemplatePath
InitializeControls
Simple
GetScriptReferences
GetScriptDescriptors
SAMPLE: For more information about the code of the designer, see CustomWidgetDesigner.cs in Sitefinity documentation-samples on GitHub.
CustomWidgetDesigner.cs
To implement the client component of the designer, perform the following:
registerNamespace
Type
SAMPLE: For more information about the code of the designer, see CustomWidgetDesigner.js in Sitefinity documentation-samples on GitHub.
CustomWidgetDesigner.js
CustomPrefix
VirtualPathSettingsConfig.config
Global.asax
SAMPLE: For more information about the code of the designer, see Global.asax.cs in Sitefinity documentation-samples on GitHub.
Global.asax.cs
You must associate the widget class with the control designer. This is done by the ControlDesignerAttribute class. You must add this attribute to the widget class.
ControlDesignerAttribute
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important