In Sitefinity CMS, you can create your new custom widgets as standard ASP.NET custom controls or you can derive them from one of the built-in base classes – SimpleView and SimpleScriptView. They are designed to improve the development of controls for Sitefinity CMS.
In addition to the LayoutTemplateName, the SimpleView class exposes the LayoutTemplatePath property. It is used to refer an external template that is placed outside of the assembly. If you do not set LayoutTemplatePath property, Sitefinity CMS enables you to use your own templates instead of the embedded template. With this feature of custom widgets, you can adjust the looks of the widget with minimal amount of work.
The SimpleView class attempts to load the template located at LayoutTemplatePath value, but falls back to the LayoutTemplateName value, if there is no path provided, or the template could not be found. This provides customization while, at the same time, preserves stability in case the user input was wrong.
When creating new custom widgets, to map the markup file with the code-behind for a new custom widget, you must override the LayoutTemplatePath property and put the path of the markup there. When registering the new widget in Sitefinity CMS toolbox, you must provide the whole path, as opposed to only the virtual path.
Keep in mind that you cannot subscribe to events through the .ascx file of the widget. For more information, see Overview: User and Custom widgets.
The new custom widget can reside in Sitefinity CMS solution or in another solution.
If you want to enhance your control to have a smoother UI, represented for example, by a Kendo application. You can derive your custom widget from the KendoView class.
For more information, about Kendo, see Kendo UI documentation.
To create a new custom widget, you follow these steps:
The custom control holds the logic of the new widget.
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
Copyright © 2021 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, Ipswitch, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.
Powered by Progress Sitefinity