Feather MVC-based widgets differ from the standard Sitefinity CMS widgets by their design and functionality. These widgets come with new property editors based on the Bootstrap framework and AngularJS. For the UI of these widget Feather provides predefined packages based on different frontend frameworks that provide built-in styling options for your website.
For more information, see feather-packages and feather-widgets repositories on Sitefinity CMS GitHub.
The following tutorial demonstrates how to create a new Feather MVC widget.
NOTE: You can also create the Class Library in the SitefinityWebApp project and not necessarily in an external project.
In case you are creating the MVC views and .CSHTML files in an external assembly. However, this results in not having the Code IntelliSense feature of Visual Studio not enabled and you do not get the suggestions and autocomplete for your code.
NOTE: You need to make sure Telerik.Sitefinity.Feather.Core NuGet package in the class library project is the corresponding version as the one in the SitefinityWebApp project.
To enable Code IntelliSense in Visual Studio:
NOTE: In case you complete this step for all build modes (Debug and Release, by default), the compiler will always output the .DLL files in ~/bin folder, instead of the default bin/Debug and bin/Release folders. As a result, all build configuration modes will output to the one and the same path. If, for the Release build, you do not modify the output path from bin/Release/ to bin/, Code IntelliSense is not enabled for the Release build.
NOTE: This web.config file is only used to enable the Code IntelliSense feature. All other configurations must be made in the web.config file of the SitefinityWebApp project.
Your controller must inherit the System.Web.Mvc.Controller class. You add an Index method that returns an object of type ActionResult. The Index action returns a list of items from the model. You modify the code of the Index action to populate the Message of the Model.
NOTE: TheRaw helper method is introduced in MVC 3 and it helps to output any HTML without encoding it.
You can use the widget from the MvcWidgets section on any page.
NOTE: The target .NET framework of the SitefinityWebApp project and the MyFirstMvcWidget project must be the same.
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
Copyright © 2020 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, Ipswitch, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.
Powered by Progress Sitefinity