.NET Core samples

Source code of built-in widgets

You can find the source code of all built-in widgets that are shipped with the ASP.NET Core Renderer in the ASP.NET Core widgets sample on Sitefinity GitHub repository.

You can use these samples to extend the functionality of the built-in widgets.
For more information, see Extend the built-in widgets.

ASP.NET Core samples

You can find various samples and examples of widgets, templates, and other components in Sitefinity ASP.NET Core samples on Sitefinty GitHub repository.

This is a repository contains the samples that demonstrates how to develop your frontend applications with Sitefinity.

Following is a list of some on the samples:

  • Sitefinity data widget
    In many cases your custom ASP.NET Core widget need to get and display some items from Sitefinity CMS backend. Using this sample, you can create an ASP.NET Core widget that works with different types of content persisted in Sitefinity CMS modules, such as News items, Content blocks, dynamic and media items.

    To accomplish this, your custom ASP.NET Core widget must use OData calls to interact with Sitefinity CMS. 
    You can achieve this using the provided IRestClient for working with OData services.
    To create the widget, use Sitefinity data widget sample on Sitefinity GitHub repository.

  • Custom layout sample
    This sample demonstrates how to setup a custom layout file that you can use as a base template for building your ASP.NET Core application.
    To create the template, use Custom layout sample sample on Sitefinity GitHub repository.
  • Hello world widget
    This sample demonstrates how to create a ViewComponent that will be used to display a configurable message. The sample is explained in more detail in Create a custom ASP.NET Core widget.
    You can find the whole sample in Sitefinity GitHub repository » Hello world widget.
  • Customize widget designers
    This sample contains a widget that uses all available field types, attributes, and validations.
    To create the widget, use the All properties sample on Sitefinity GitHub repository.
  • Admin App widget editor
    This sample demonstrates how to override a specific field of a widget designer or override the entire view of a widget designer.
    To create custom widget, use the Admin App custom widget editor sample on Sitefinity GitHub repository. 

Quantum sample with ASP.NET Core Renderer

The ASP.NET Core page demo is an example of how to build your ASP.NET Core website, using custom widgets and layouts. You can use it to play with it or extend it, helping you to kick-start your .NET Core project.

Setup

  • Download and setup the Quantum demo website from Sitefinity GitHub repository. 
    Follow the setup procedure, described in the repo.
  • Download Sitefinity ASP.NET Core demo Renderer from Sitefinity GitHub repository. 
  • Set up the Renderer to work with the Quantum demo site, using the Setup procedure.
  • Build the Renderer and start it.
  • Login with the following credentials:
    • Username: admin@test.test 
    • Password: admin@2

RESULT: Your Quantum ASP.NET Core demo Sitefinity CMS and Sitefinity ASP.NET Core Renderer are setup and you are ready to play and test it.

net-core-service-demo-megamenu

Custom features

The demo contains:

  • Two new ASP.NET Core page templates – Quantum ASP.NET Core, based on the _QuantumLayout.cshtml file, and Quantum ASP.NET Core Article.
  • New ASP.NET Core pages are grouped under the Net Core Renderer group page.
  • Mega menu custom widget
  • Custom section widget
    A static section that uses different container setups, based on Bootstrap 5 resource package. 
  • Testimonials custom widget
    It showcases how to use a dynamic module.
  • Document custom media widget
    It allows you to download a file.

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?