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 .NET Core templates to pages but you would usually do this for demo purposes or to get acquainted with designing pages in Sitefinity CMS.
For more information, see Apply page templates to pages 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 Personalize pages.
Apply page templates to pages
You can base a page on a page template in one of the following ways:
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 in the toolbar and then click Select another Template button.
- 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
- Click Done.
The template is applied to the page.
You can change between different templates of the same type. 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.