Creating and Managing Display Page Templates

Creating and Managing Display Page Templates

Available Liferay DXP/Portal 7.3+

Display page templates define structures for displaying content at a dedicated friendly URL. These templates currently support the following content types:

See Using Display Page Templates to learn more.

Creating a Display Page Template

Follow these steps to create a display page template:

  1. Open the Site Menu (Site Menu) and click DesignPage Templates.

  2. Click the Display Page Templates tab.

    Go to Page Templates, and click on the display page templates tab.

  3. Click the Add button (Add Button).

  4. Enter a Name for your template and select a Content Type and Subtype, if applicable. Then click Save.

    Select the content type and subtype for your new template.

  5. Design the template using the same interface and page elements as content pages.

    Build your template using fragments and widgets.

  6. Once you’ve added page elements, you can map them to content structure fields (e.g., title, description) by double-clicking on an editable field. Mapped fields are outlined in purple.

    tip

    You can use mapped fields when configuring SEO and Open Graph settings for a display page template. See Configuring SEO and Open Graph for more information.

    Map page elements to structure fields.

  7. Before publishing, you can preview your editable fields mappings with existing content using the preview function (available 7.4+).

  8. When finished, click Publish to save your work.

You can now use the template to display your content.

Preview the Display Page Template Content Mappings

Available 7.4+

While editing, Liferay provides two ways to preview display page templates with content items.

From the Application Menu, you can click the Preview With drop-down menu and choose a content item. If no item appears, click Select Other Item and browse for the desired content. This dynamically populates the template with content data according to your field mapping.

Choose the content you want to use to preview your display page template.

Alternatively, from the display page template editor, click the Actions menu(Actions menu) button and choose Preview in a New Tab.

Click the Preview button to preview your display page template mappings.

Viewing Display Page Template Usage

Available 7.4+

You can manage the different display page templates using the Actions menu (Actions). From here, the View Usages option provides a list of content that uses a specific display page template other than the default template. This option is not available for default templates.

Managing your display page template using the Actions menu

Before you delete a display page template that is in use, you have two ways to unassign the display page template from the content:

  • Assign to Default: Your content is unassigned from the current display page template and assigned to the default display page template for the content type and subtype (if applicable.)
  • Unassign: Your content is not assigned to any display page template.

Follow these steps to view your display page template usage and unassign your content:

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

  2. Click the Display Page Templates tab.

  3. Click the display page template’s Actions menu (Actions) and select View Usages.

  4. Select one or more elements from the list of content using the display page template.

  5. Click the Actions menu (Actions) in the top-right corner and select Assign to Default or Unassign.

  6. Click OK.

If you assign your content to a new display page template, make sure the content appears as expected. To preview and display your content, see Publishing Content with Display Pages.