Widget samples in GitHub

This section includes tutorials that introduce you to more complex scenarios when working with MVC widgets in Sitefinity CMS.

In addition, following is a list with samples. You can download any of the samples from the GitHub repository.

Sample Description
DevMagazine site

The website showcases how you can use the MVC framework to build an entire website from scratch. The site includes:

  • Mobile responsive design
  • Built-in widgets
  • Custom widgets with simplified dependency injection, use of content locations service for resolving items’ locations, Master/Detail view functionality, and so on
  • Frontend packages for delivering responsive design and defining all styling rules

To see a detailed tutorial how to build the site, see Tutorial: Create a DevMagazine site.

List widget

Demonstrates how to create a simple MVC List widget. The List widget displays a list of items on the frontend and provides functionality for configurations via a customized designer. You learn how to create a MVC widget in a separate assembly that uses a custom designer.

To see a detailed tutorial, see Create a List widget.

Custom widget with multiple selectors 

Demonstrates how to create a simple MVC Author widget:

  • Displays an author with his name and description
  • Displays profile image
  • Links to a page in Sitefinity and to an external page

You learn how to build a complex designer leveraging the built-in client components.

KendoBooks widget  Demonstrates how to create and use a Kendo Grid in an MVC widget. In this sample you use Kendo via wrappers for ASP.NET MVC.
Customize the Content block toolbar 

Demonstrates how to specify which tools are available in the Kendo editor toolbar in a Content block widget. You can change the Content block toolbar globally or create your own widget designer with different set of tools in the toolbar.

Single dynamic content widget  Demonstrates how to create custom MVC widget for displaying single dynamic content item. The Single Dynamic Content widget provides the option to change the dynamic content type and the dynamic content item displayed in it in the designer through build-in sfDynamicItemsSelector client component. 
ReCaptcha widget Demonstrates how to add a Captcha functionality to a MVC Form widgets by including a Captcha widget that can only be used inside a form.

Content with custom styles block  and

Boldless Content block

Both samples demonstrate how to override the default view for the HTML field used by the Content block widget designer. specify which tools are available in the Kendo editor toolbar in a Content block widget. You can change the Content block toolbar globally or create your own widget designer with different set of tools in the toolbar.

Widget custom designer with dynamic content Demonstrates how to create custom designer views for dynamic content MVC widgets. This sample requires you to create a dynamic type Countries to work. It has to have a value for Content type (singular) set to Country, with two properties of type short text - Title and Continent. You can use the structure and the items for the Countries module by using the attached ZIP and XLSX files for the structure and the items, respectively.

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.


Was this article helpful?