Add resources to your application

Using CSS styling, JavaScript logic, and jQuery support is a part of the process of developing your custom Sitefinity CMS features. Thus, your custom functionality is styled and presented according to your requirements.

For more information about the complete set of features, see Sitefinity Features & Capabilities.

You can add JavaScript, CSS, and Sitefinity’s built-in jQuery resources. Depending on what resource you want to add, what you want to style, and where to apply styles, you can add resources to a widget, page, or to a master template.

You include the CSS resources and the JavaScript resources in your implementation's markup and code-behind, respectively. You can include CSS and JavaScript resources to the implementation of both custom and user widgets.

You can either:

  • Add resources to your Sitefinity CMS project - resources (scripts or styling) apply only to the current project
  • Add resources to an external class library - you can reuse the resources (scripts or styling) in different projects or applications
    NOTE: If you add resources to the external library, you must add them as embedded resources, otherwise you cannot reference them from other Sitefinity CMS projects.

When you add the scripts as embedded resources, they are always combined automatically in a single file along with Sitefinity's default resources (files, CSS, and scripts) and you can easily download and use them together.

When you add resources as as content items, they are loaded as a separate file in the browser.

You can link embed resources to a widget using the ResourceLinks widget. For more information, see Utility widgets: ResourceLinks widget.

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?