Creating portal engine page templates

There are two types of portal engine page templates:

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

Page terminology

The main purpose of page templates is to build the design of Pages, i.e. documents that focus on presentation rather than holding data. Pages are document types 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) document type to create pages.

Non-page documents also use page templates, but typically inherit their template from a parent page document.

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 document for the new page.
  3. Click New () and choose the Page (menu item) document 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 document’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 document’s 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

Build the structure and content of the template by editing the page layout and adding web parts.

Creating re-usable page templates

Re-usable templates allow you to:

  • Prepare templates that content editors can select when creating pages
  • Share the same page template across multiple pages

To create a re-usable template:

  1. Create a new page with an ad-hoc template 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

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

  1. 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 document - if checked, the system automatically assigns the new template to the selected document instead of the original template.
  2. 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

Modifying re-usable templates

When you edit the layout or web part configuration 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 document.

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

Keep in mind that the new template is now ad-hoc. If you delete the associated document 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.