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.
Feather uses a strict convention for resolving the views for widgets. This article describes the different ways to add a view to a widget and what are the priorities for the different approaches.
Following is a list of the different ways to resolve views for widgets. The list is ordered by priority from highest to lower:
ResourcePackages
~/ResourcePackages/[Package Name]/
You can have several packages with different package names. A page template can use one package. For more information, see Feather: Base page templates on layout files.
MVC
~/MVC/Views/ContentBlock/[ViewName].[extension]
The extension of the template file depends on your view engine. For Razor the extension is .cshtml, for WebForms the extension is .aspx.
.cshtml
.aspx
After you create a new template, you can map it to the widget by opening the widget designer and selecting the template in the dropdown boxes for the list template or the detail template . The following image displays how Airport templates for list and detail views are mapped to the Airports custom MVC widget:
Embedded resources By design, the MVC controls that come out-of-the-box with Feather, such as Navigation, ContentBlock, or New, have corresponding assemblies that are referenced by the SitefinityWebApp. In each of the assemblies the views have their Build action set to Embedded resource. This way all views are included in the assemblies. This is the final place where Feather searches to resolve the widget view.
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