Automatic registration of scripts for client components

In general, when you create a widget designer, you need the following:

  • The designer’s markup
  • The JSON file that describes your designer script, the component dependencies, and the priority.
  • The JavaScript files that hold your client logic and registers and wires up dependencies for your designer’s AngularJS module.

For more information, see Create custom designer views.

In some cases, except the client components that you use in your designer markup, you do not have explicit JavaScript dependencies to include in your designer JSON file. In most cases, you may also want to use this designer view as your default one. For example, if you are using the sf-expander client component, you need to create a JSON file that requires the sf-client component.

In this case, Sitefinity CMS automatically takes care of the resolution of the of client components' scripts. You do not have to create the JSON file, only to specify the client components and the view priority. 

If, however, you create your JSON file following the conventions, Sitefinity CMS will respect it and use it. Note that, if you do not include a client component, but you are using it, this will cause an error and Sitefinity CMS will not automatically take care of it.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

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.

Web Security for Sitefinity Administrators

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.

Foundations of Sitefinity ASP.NET Core Development

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.

Tags

Was this article helpful?

Next article

Client components