Pure MVC mode

Pure mode lets you use MVC controllers as widgets on a Sitefinity 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 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 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, you have to create a template and set its advanced options accordingly. In the create screen, choose MVC only for the value of Web Framework.

Pure MVC mode - create a template

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 Creating MVC-based Sitefinity widgets.

Next steps

+1-888-365-2779
sales@sitefinity.com

Related topics:

Feedback

How useful is this article?

Tell us more

Submit
Your message was successfully sent.

We appreciate your feedback.

Your message could not be sent.

OK