Create widget designers
Sitefinity CMS provides enhanced user experience for working with custom ASP.NET Core and ASP.NET MVC widgets. By default, Sitefinity CMS detects the types of the public properties that you define in the code of the widget and automatically generates the widget editor with the respective fields.
The widget editors support the following:
- Editing the properties through more user-friendly, type-specific field editors
- Grouping properties in section and views
- Validating the user input
- Conditionally displaying fields, depending on custom requirements
In Sitefinity CMS, the autogenerated widget designers for the .NET Core and .NET MVC widgets are based on a common framework, which is extracted into the
Progress.Sitefinity.Renderer assembly . This assembly holds all the common types and attributes to help you customize autogenerated widget designers for both frameworks.
Following is a general process of widget creation:
- You first decide which fields you want to include in the widget.
- Then, you can customize the fields, using the desired attributes.
- You can impose field validations, if required.
- You distribute the fields into sections or views.
- You can make some fields to be displayed conditionally.
- Finally, Sitefinity generates the fields in your widget designer.