About Display Page Templates and Display Pages¶
Display Pages are paired with Display Page Templates to present your content in a pre-defined layout. Similarly to Content Pages, you organize the Display Page content in Fragments and Widgets and use a Display Page Template to organize how that content appears. Using a single Display Page Template, you can apply the same layout multiple times to different content of the same type.
With Content Pages, you can create the Page layout and composition, but you cannot save and reuse them as templates.
For instance, you can create a Display Page Template for different Web Content Articles and display the content in different Display Pages, each using the same layout but with a unique friendly URL. Additionally, you can define SEO settings to improve your Pages’ search ranking. Display Pages are ideal for showing a catalog of elements in a consistent way, like business case studies, product or service options, or apartments/flats, or job listings.
For more information about the different ways of displaying content in Liferay DXP, see Displaying Content.
Understanding Display Page Templates and Display Pages¶
The Display Page Template determines how to display and map your content on the Display Page. Creating a Display Page Template is similar to how you add elements to Content Pages. However, Display Pages are always associated with a certain type of content, while Content Pages are not.
To create a Display Page, create a Display Page Template first and then display the content using the Display Page unique URL.
When you create a Display Page Template, you choose among the following types of content to associate:
Consider these items when creating and managing Display Page Templates:
You can create more than one Display Page Template for the same content type, but you can set only one by default.
You can publish content using the default Display Page Template or a specific Display Page Template (see Publishing Content With Display Pages for more information.)
The Display Page renders your content using a unique friendly URL.
To update your Display Page layout and mappings, update the Display Page Template under Site Administration → Design → Page Templates.
Using Display Page Templates and Display Pages Example¶
Consider this example to better understand how you can implement Display Page Templates and Display Pages on your Site.
On your insurance business website, you want to showcase the different insurance options for prospective customers. You have Web Content Articles that describe each option. You start with a landing page where visitors can see all options at a glance. They click one of four options to access a new page containing the corresponding insurance details.
Content Pages give you the tools to create stunning landing pages.
You want to use the same layout for each one of the four detail pages describing the different insurance options, and you want to map each field dynamically to the insurance information in your Web Content Articles.
To achieve this goal, you create a single Display Page Template named Insurance Details where you map the fields in your Web Content Articles to Fragments in your template composition. Then, you define this new Display Page Template in the Web Content using the Web Content Article properties. When you display this Web Content using its friendly URL, the Display Page uses the layout and mappings from the Display Page Template.