For developers: Pure MVC mode

Pure mode lets you use MVC controllers as widgets on a Sitefinity CMS page. You can compose the whole page using MVC widgets only, and no WebForms functionality is allowed in this mode. The major benefit is that you have complete control over the markup and how the content from the controllers is rendered. There are no forms or ViewState that you don’t want to use.

In this mode you can add multiple controllers on the same Sitefinity CMS page. This may be confusing for developers who have used regular ASP.NET MVC projects, where controllers correspond to a single page (url). We’ve taken the page abstraction lower. You can think of a Sitefinity CMS page as playing the role of the MVC runtime, which sits before your controllers are invoked and composes the markup each of them generates.

Create an MVC template and page

To use Pure mode in Sitefinity CMS, you have to create a template and set its advanced options accordingly. In the Create a template dialog, enter a Name such as MVCPureTemplate, then choose Don't use template, and the Advanced setting MVC only.

Once created, this template and all pages based on it can host MVC based widgets only. You cannot use the WebForms model in this mode. The toolbox will be filtered to only show the custom controllers you have developed as widgets.

For more information on how to implement MVC widgets, please read For developers: Create MVC-based Sitefinity CMS widgets

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?

Next article

Hybrid MVC mode