Page templates

Before you populate your page with content, you create the layout that defines how and where content is positioned and displayed on pages. For example, you allocate space for the navigation, the header, and the content blocks. To do this, you use predefined or customized page templates, which you can modify further, if needed. By setting and applying the page template, you basically define the appearance and style of an individual page or all pages.

To see and manage the list of all templates that your website pages are based on, navigate to Design » Page templates.

Types of page templates

In Sitefinity CMS, you can work with three types of page templates, depending on the technology you use and the widgets you place on pages. The mode you use depends on your development process as well as the functionality you want to implement.

The following sections summarize the template types, along with an overview when and how you use them.

Pure MVC mode

In pure MVC mode, you directly control the markup of templates. You work with Razor layout files and leverage the set of grid widgets, provided by the resource package, which help you customize your layout by dropping them on your pages. Once you need to modify and style your MVC page templates, you do it in the resource package since it groups and organizes all your resources, templates, front-end assets, CSS files, and so on. When working with MVC-only templates, you do not need to work with the Responsive and Mobile design module since the MVC framework is mobile-first. Responsive design is provided by the CSS framework, used in the Bootstrap package, shipped with Sitefinity CMS out-of-the-box.

RECOMMENDATION:

Working in MVC mode is the recommended way to work in Sitefinity CMS, especially for new projects. Development process is optimized and modification of your website functionality and appearance – quick and easy.

For more information, see:

Pure Web Forms mode

When working with Web Forms, you base your page templates on .master files and define the appearance and style of the page by setting the template and the theme.

For more information, see Create hybrid or Web Forms template using a Master page.

For more information about setting WebForms and hybrid templates through the code, see For developers: Apply page templates

Hybrid mode

Hybrid mode lets the template and all pages, based on it, use both MVC widgets and Web Forms widgets on the same page. Thus, if you have legacy pages with Web Forms widgets, say with Forums, you can still take advantage of MVC technology benefits.

When you create a hybrid template, Sitefinity CMS creates a page object, but also routes to all MVC controllers that you have on the page and inserts their markup into the output. This works in exactly the same way that ASP.NET MVC does, so you can fully expect your widgets to behave like they would normally.

However, you need to be aware of the specifics and dependencies the two technologies entail.

For more information, see Dependencies when working with hybrid page templates.

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

Widget templates