Create page templates

Generally, you operate with the page template(s) that are based on the default layout file. You modify the default template or create new templates, based on it. 

When creating a new project, by default, the selected framework is MVC. You can also work in hybrid mode. For both modes, you do not have to start creating a new template from scratch. You can use the default templates that contain a single placeholder and then modify it further. Once you select a template and its framework, if you require to base the template on another template in a later point in time, you can select just from the list with templates from the same framework, thus avoiding any shortcomings from switching framework.

If required by your scenario, you still have the option to work with Web Forms templates by configuring which frameworks page templates use. To do this, navigate to Advanced settings » Pages section and set the Page templates framework to All.

Create page templates based on existing templates

To create a template based on another template:

  1. In the main menu of your website backend, click Design » Page Templates.
  2. Click Create a Template.
  3. In Name input field, enter a name for your template.
  4. Select Use template and click Select another Template.
    Click on a template, which will serve as basis for your new template.
  5. Click Done.
  6. Click Create this template.
    Your new template opens in the Layout editor, where you can divide and reorder the blocks as you desire.

When creating a page template based on another template, keep in mind the following:

  • Changes of a template are applied to its child template.
  • You cannot edit the parent template while editing the child template.
  • If you delete a template, all of its child templates and all pages that uses this template will also be deleted.

 

RECOMMENDATION: When you create a nested page template, based on a layout file, we recommend that you select the MVC only option, as there may be potential issues in Web forms or hybrid modes. For more information about layout base templates, see For developers: Create MVC page templates based on layout files.

Next, you modify the template according to design. For more information, see Modify page templates.

 

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to 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

Modify page templates