Creating a Page Template

Creating a Page Template

Available: Liferay DXP/Portal 7.3+

Page templates help you create pages efficiently based on predefined layouts and content. There are several basic page templates available out-of-the-box.

Basic page templates are available.

You may also create your own content page templates and widget page templates, as described below.


For Liferay DXP 7.4+, page template collections are called page template sets in the Liferay UI.

Creating a New Page Template

The steps below show how to create and use widget and content page templates.

  1. Open the Site Menu ( Site Menu icon ) and navigate to DesignPage Templates

  2. Select the Page Templates tab.

  3. Click New and create a new page template set to organize your page templates.

    Creating a new page template set.

  4. Click Add ( Add Page Template ) and select either Widget Page Template or Content Page Template. You can edit the page template at any time by clicking the Actions button ( Actions ) next to the page template in the set and selecting Edit.

  5. Enter a Name.

  6. Click Save.

  7. You’re brought automatically to the new page template. Follow the instructions in Widget Pages to create your widget page template. Likewise, see Building Content Pages to configure your content page template.


You can preview your newly created page template. In the Page Templates page, select the Action menu ( Action Icon ) for the template you want to preview, and select Preview.

Creating a Page Template from an Existing Page

You can also create a page template from a page while you are editing it. The new page template keeps all of the same configurations for fragments and widgets when it is created. This saves you time making more templates for pages that you may decide to reuse as you expand your site.

Follow these steps to make a page template from a page:

  1. While editing the page, click Options ( Options ) and select Convert to Page Template

    Click Convert to Page Template in the Options menu to turn the page you are editing into a new page template.

  2. In the modal that appears on the screen, select an existing page set or select Save in New Set to create a new page template set for the page template.

    Here, you can set the basic information for your new Page Template.

    If you do not have a page template set, choose a Name and, optionally, a Description for a new page template set in the modal that appears on the screen. Click Save to save your page as a template in the newly created template set.

  3. Click Save.

The chosen page template set now has a new page template based on the page you are currently editing, as a draft. You must publish this page template draft to use it for new pages.

Sharing a New Page Template

By default, only the creator of the page template can use it.

To give other users access to a newly created page template follow these steps:

  1. Select Permissions from the page template’s actions menu.

    Configuring permissions for a page template to allow other users access.

  2. Check the View permission for the roles that you want to have access to the page template. If you want any user who can create a page to be able to use the page template, check the View permission for the User role.

  3. Click Save.

Users with the roles specified now have access to the page template.

Propagating Changes for Widget Pages

When creating a page from a widget page template, changes are inherited from the page template by default, so future changes are automatically propagated to the pages that use the page template. Site administrators can disable this behavior through the settings for the individual page.

Propagating Changes for Content Pages

Changes for content pages are not automatically propagated when created using a content page template. However, you can propagate changes to fragments used on a content page. See Propagating Fragment Changes for more information.

Sharing Page Templates With Other Sites

You can share your page templates with other sites using the same process as you would for pages. Follow the instructions in Exporting/Importing Site Pages and Content to learn how.

Staging and Page Templates


Staging functionality is in maintenance mode as of 7.3 GA1+.

If staging has been enabled, changes to the widget page template are propagated automatically to the staged page. These changes must still be approved before the page is published to the live site. For this reason, the automatic propagation of widget page template changes to the staged page cannot be turned off and the Inherit Changes selector does not appear.