Before you populate your page with content, you create a layout that define show content is positioned and displayed. For example, you allocate space for the navigation, the header, and the content blocks. To do this, you use predefined or custom page templates, which you can modify if needed. You define the appearance and style of the page by setting the template and applying it to pages.
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.
In 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. Grid widgets help you customize your layout by dropping them on your pages. Each grid widget on a page forms one or several placeholders for your other widgets (depending on the page template). 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.
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:
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 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.
In Sitefinity CMS, the easiest way to apply a template to a page is to use the predefined set of MVC only and hybrid templates. You can also create layout templates in the Layout editor from scratch or modify existing ones. In addition, you can create a custom template and apply it to pages.
NOTE: When working with Web Forms of Hybrid templates, you base the page templates on .master files.
You manage templates on Templates page.
NOTE: You can create personalized version of each page. Personalizing a page gives you the opportunity to serve different content to different types of users (user segments). You can build set of rules on which the user segments are based.
For more information, see Create a personalized version of a page.
Back To Top