Widget designers

With Sitefinity CMS, you can work with the widget designer framework, based on client technologies like HTML, JavaScript, AngularJS, and Bootstrap. You can also benefit from a library of reusable client components.

А widget designer is an AngularJs module, in which each view has an AngularJs controller. By default, Sitefinity CMS exposes all public properties available in the widget controller, so they can be edited through the widget’s designer. All of these properties are available in $scope.properties of the AngularJs controller. When you edit any of these properties and save the designer, your changes are persisted in the database. Using $scope.properties enables you to bind properties of the widget directly in your designer view template without writing any additional code. The property service object enables you to get all widget controller properties and use them in the widget designer controller.

Controllers are separate components, so can be easily reused between views. 
For more information, see AngularJs and  AngularJs Scopes.

Widget designers load a predefined AngularJs controller that handles populating and saving of widget properties through the designer. If you want to modify this default AngularJs controller, you can extend the designer with additional client logic. For more information, see Extend default widget designers.

When working with or extending default widget designers and your designer views use only client components:

  • The JSON file with scripts registration is automatically generated.
  • The JavaScript file with all Angular dependencies is automatically generated.
  • If no other designer views with explicitly set priority exists, the priority of the designer view is set to 1.

NOTE: If you have JSON or JavaScript files that match the naming conventions, even if these files are empty, automatic scripts registration or dependencies registration do not occur.
For more information, see Client components.

Additional resources

ARTICLES

External links

 

Tags

Was this article helpful?