IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
When working with MVC-based widgets and templates, you create and manage files of specific types and generally store them in a specific location in your project. You follow naming conventions that define how Sitefinity CMS prioritizes and resolves views and assets like scripts, for example.
Say you are creating a designer view, named Custom, for a News widget. The following table summarizes how you name your files and where you store them: naming conventions and location of the files you need:
A template for the custom view in the widget designer.
IMPORTANT: You can use only alphanumeric characters and underscore.
A template for the custom view of a dynamic content type widget. <DynamicContentTypeName> is the name of the dynamic content type, for example Country. If you created a dynamic type with name Countries, the folder name must still be named with singular form.
A JSON file that defines a set of additional scripts (and their dependencies), required by the designer view, to be rendered.
JSON
Has the same name as the view template.
~/MVC/Scripts/News/Custom
designerview-custom.js containing AngularJS controller named CustomCtrl
In addition, Sitefinity CMS follows a strict convention for resolving views for widgets, based on where the view files are located. For details, see Priorities for resolving views.
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