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
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important