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:
- Blog Entries
- Categories Available 7.4+
- Custom Objects Available 7.4+
- Documents
- Web Content Articles
See Using Display Page Templates to learn more.
Creating a Display Page Template
Follow these steps to create a display page template:
Open the Site Menu (
) and click Design → Page Templates.
Click the Display Page Templates tab.
Click the Add button (
).
Enter a Name for your template and select a Content Type and Subtype, if applicable. Then click Save.
Design the template using the same interface and page elements as content pages.
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.
tipYou 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.
Before publishing, you can preview your editable fields mappings with existing content using the preview function (available 7.4+).
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.
Alternatively, from the display page template editor, click the Actions menu() button and choose Preview in a New Tab.
Viewing Display Page Template Usage
Available 7.4+
You can manage the different display page templates using the Actions menu (). 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.
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:
Open the Site Menu (
) and go to Design → Page Templates.
Click the Display Page Templates tab.
Click the display page template’s Actions menu (
) and select View Usages.
Select one or more elements from the list of content using the display page template.
Click the Actions menu (
) in the top-right corner and select Assign to Default or Unassign.
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.