Page templates and pages

In Sitefinity CMS, pages are based on page templates. You can apply a default template to all pages on your site, or, apply specific templates to individual pages. For example, pages that serve different purposes or scenarios and therefore need different design, require different layout elements and content block configuration. Say, each page on your website has common elements, such as header with a logo and with contact information. The body contains the copy, and any sliders, sidebars, and so on. You may need a page with a sidebar navigation for browsing products in a catalog, or, you may need a specific layout for pages to downloading a trial of your products, and so on. Thus, for pages with diverse purposes and design, you use different page templates.

There are two types of page templates you can work with:

  • Templates you created and modified
    Most commonly, you create and base a page template to an existing template and you modify it according to your needs. You then apply it to pages.
    For more information, see:
  • Built-in Sitefinity templates
    You can apply the built-in MVC only and hybrid templates to pages but you would usually do this for demo purposes and to get acquainted with designing pages in Sitefinity CMS. In the real world you would not count on them.
    For more information, see the Apply built-in page templates section below.

You can also create personalized versions of pages with different layout and widgets to serve different content to different types of users (user segments). For more information, see Create a personalized version of a page.  

Apply page templates to pages

You can base a page on a page template in one of the following ways:

  • When creating the page, you choose from the set of Sitefinity CMS page templates
    For more information, see Create a page.

    NOTE: You can only select from hybrid and MVC only templates.

  • Change the template of a page later

You change a template of a page in one of the following ways:

  • On Pages page, click the Actions link of the page, whose template you want to change, click Template.
  • In page content editing mode, click Layout button in the toolbar and, in the lower-right corner of the page, click Select another template... button.
  1. Click one of the templates displayed.
    Both predefined and custom page templates are listed and you can further customize or change the layout template later.

    NOTE: MVC templates are designated with an MVC label.

  2. In case you are using hybrid or Web Forms templates, you can upload your own .master file by clicking Use your own .master file.
    Select a master file from the App_Master folder and click Use Selected.
  3. Click Done.
    The template is applied to the page.

You can change between different templates of the same type, for example, MVC. Placeholders with the same name or ID get the same widgets. If there is no such placeholder, new template widgets will be orphaned and you need to manually place them in another placeholder.

IMPORTANT: If you want to change the existing page template of a page, the system replaces the old template with the new one. All modifications of layout and content are preserved, and the new layout is appended to the existing.

Was this article helpful?