Mastering Liferay Design Elements

Course Overview

Standardizing Page Layouts

Page templates provide predefined layouts and structures that serve as blueprints for creating new content pages. While they share some similarities with master page templates, page templates serve a different purpose in your Liferay design toolkit. In this lesson, you’ll compare and contrast page templates and master page templates to better understand the utility of both features.

Understanding Page Templates

Master page templates provide an overall frame for different types of pages, often focused on peripheral elements like headers, footers, and menus. Typically, the main content area of a page is not configured by a master page, as this section is the most likely to differ from page to page.

Page templates essentially function as starter kits for these open content areas. If you have a set of pages that are going to present information in a similar format, you can implement a page template with a grid and drop zones configured to enforce that format. Even if each page is presenting information from a different source, they can all use the same template as a blueprint for how the content is rendered.

The key distinction is that unlike master page templates, page templates are not fixed or restrictive. A page template stamps a page with an initial state, but any components from the template can be edited or removed within the page itself. You do not have to edit the page template itself in order to edit a page using the template.

Although page templates are more transient than master page templates, they provide many of the same benefits: a centralized interface, accelerated page development, flexibility and reusability, and the empowerment of non-technical users.

Best Practices for Page Templates

Page templates, unlike master page templates, are entirely optional in Liferay. For one-off pages like a homepage, Liferay does not recommend using a page template, as the structure and layout of its content is unique. Avoid using a page template just for the sake of having a template.

Instead, reserve the use of page templates for scenarios where you have more than one page using the same layout. Here are some examples:

  • Landing pages for multiple marketing campaigns that need consistent branding despite varied content.
  • Enterprises that require standardized layouts for each of their regional sites.
  • Event microsites with pages for agenda, speakers, and registration.
  • Customer support portals with FAQs, product updates, training resources, or ticket submissions.
  • Intranets that need to provide standardized department pages, announcements, or human resources material.

Page templates are highly customizable and reusable. The more they are reused, the more useful they become, and vice versa. Carefully consider the needs of your solution to determine whether or not employing page templates is warranted.

Conclusion

If a master page template provides a frame for your site pages, then a page template acts as a canvas within that frame. When used selectively, page templates are a powerful tool for accelerating both page design and content creation.

Next, you’ll review what you’ve learned before moving on to the next module.

  • Understanding Page Templates

  • Best Practices for Page Templates

  • Conclusion

Loading Knowledge

Capabilities

Product

Education

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy