---
title: Creating portal engine page templates
related:
  - https://docs.kentico.com/k10/developing-websites/developing-websites-using-the-portal-engine/editing-page-layouts.md
  - https://docs.kentico.com/k10/developing-websites/developing-websites-using-the-portal-engine/using-and-configuring-web-parts.md
  - https://docs.kentico.com/k10/developing-websites/developing-websites-using-the-portal-engine/inheriting-portal-engine-page-content.md
  - https://docs.kentico.com/k10/developing-websites/managing-page-templates.md
  - https://docs.kentico.com/k10/custom-development/miscellaneous-custom-development-tasks/adding-custom-code-to-portal-engine-page-templates.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

There are two types of [portal engine](https://docs.kentico.com/k10/developing-websites/developing-websites-using-the-portal-engine.md) page templates:

- **Ad-hoc** - templates bound to one specific page. The system automatically deletes ad-hoc templates if their page is removed.
- **Re-usable** - named templates that can be shared by any number of pages, even across multiple websites in the system.

> **Note:** **Page terminology**
>
> The main purpose of page templates is to build the design of _Pages_, i.e. pages that focus on presentation rather than holding data. Pages are [page types](https://docs.kentico.com/k10/developing-websites/defining-website-content-structure/page-types.md) that have the following properties enabled on the **General** tab:
>
> - **Show template selection**
> - **Behaves as Page (menu item) type**
>
> By default, use the **Page (menu item)** page type to create pages.
>
> Pages that are not configured to behave as Page (menu item) type also use page templates, but typically [inherit](https://docs.kentico.com/k10/developing-websites/developing-websites-using-the-portal-engine/inheriting-portal-engine-page-content.md) their template from a parent page.

## Creating new pages with ad-hoc templates

The most direct way to build pages using the portal engine is through ad-hoc templates:

1. Open the **Pages** application.
2. Select a parent page for the new page.
3. Click **New** () and choose the **Page (menu item)** page type.
4. Type a name into the **Page name** field.
5. Choose the **Create a blank page** option.
6. Click **Save**.

The system adds the new page to the content tree. You can now work with the template on the page's **Design** tab. The new page uses an empty ad-hoc page template with a single web part zone.

- The section with a green header designates the area defined by the page template.
- The area with a yellow header inside the template is a web part zone, where you can place web parts.

![Viewing a new empty ad-hoc template on the Design tab](https://docs.kentico.com/docsassets/k10/creating-portal-engine-page-templates/AdHoc_Template_Design.png "Viewing a new empty ad-hoc template on the Design tab")

Build the structure and content of the template by [editing the page layout](https://docs.kentico.com/k10/developing-websites/developing-websites-using-the-portal-engine/editing-page-layouts.md) and [adding web parts](https://docs.kentico.com/k10/developing-websites/developing-websites-using-the-portal-engine/using-and-configuring-web-parts.md).

## Creating re-usable page templates

Re-usable templates allow you to:

- Prepare templates that content editors can select when [creating pages](https://docs.kentico.com/k10/managing-website-content/working-with-pages/creating-new-pages.md)
- Share the same page template across multiple pages

To create a re-usable template:

1. Create a new page with an [ad-hoc template](#creating-new-pages-with-ad-hoc-templates) and implement the required template design.
2. In the **Pages** application, open the page's **Properties -> Template** tab.
3. Click **Save as new template**.
   - The **Save as new page template** dialog opens.

> **Tip:** **Tip**
>
> You can also save ad-hoc templates as re-usable directly on the **Design** tab:
>
> 1. Right-click the page template header.
> 2. Select **Save as new template** in the menu.![Opening the page template menu on the Design tab](https://docs.kentico.com/docsassets/k10/creating-portal-engine-page-templates/Page_template_menu.png "Opening the page template menu on the Design tab")

4. Fill in the following values:

   - **Template display name** - type a name for the re-usable template.
   - **Template category** - select a category for the template.
   - **Assign to the current page** - if checked, the system automatically assigns the new template to the selected page instead of the original template.
5. Click **Save & Close**.

You can now assign the new page template when creating pages:

1. Choose the **Use existing page template** option in the template selection dialog.
2. Select the template (find the template in the category tree or search for the name).

![Creating a new page based on a re-usable template](https://docs.kentico.com/docsassets/k10/creating-portal-engine-page-templates/New_Page_Reusable_Template.png "Creating a new page based on a re-usable template")

## Modifying re-usable templates

When you edit the [layout](https://docs.kentico.com/k10/developing-websites/developing-websites-using-the-portal-engine/editing-page-layouts.md) or [web part configuration](https://docs.kentico.com/k10/developing-websites/developing-websites-using-the-portal-engine/using-and-configuring-web-parts.md) of a re-usable page template, the changes affect all pages that use the given template. If you need to modify the template only for one specific page:

1. Select the page with the required re-usable template in the **Pages** application.
2. Open the **Properties -> Template** tab.
3. Click **Clone template as ad-hoc**.

The system creates a new ad-hoc page template and assigns it to the page.

> **Tip:** **Tip**
>
> You can also clone re-usable templates as ad-hoc on the **Design** tab:
>
> 1. Right-click the page template header.
> 2. Select **Clone template as ad-hoc** in the menu.

You can now edit the template without affecting pages that use the original template.

> **Note:** **Note**
>
> Keep in mind that the new template is now ad-hoc. If you delete the associated page at a later point, the system also removes the page template.
>
> If you want to use the modified template on other pages, you can save it as a named template by clicking **Save as new template** on the **Properties -> Template** tab.
