Documentation Home

Pages

The Advanced CMS module enhances the community version of pages by providing the ability to create page types through the admin, group the display of similar pages in the admin, and also create collection pages.

This added functionality allows teams to efficiently work together to create new pages on their eCommerce site. For example, designers can create templates and identify dynamic fields that should be present. Front-end developers can then go in and create the template directly through the admin and also create the necessary dynamic fields. Finally, the business content creators can go in and create pages that leverage the new Page Type.

Page Types

Page Types drive the meta-information about what will be present on a page. Most notably, they include:

  • A list of Field Definitions, which detail out what dynamic fields should exist on the page and the types of those fields

  • A flag for hasMenuEntry, which specifies whether or not this particular Page Type should have its own entry in the Broadleaf admin. When set to true, this type of page will be excluded from the standard page list and instead they will be grouped in their own section. This is useful for segregating different categories of standalone pages.

  • A flag for isCollection. This indicates that the given Page Type is intended for something that will not only have standalone pages, but also a listing page and potentially a search results page. For example, "Press Release" might be a collection page type, which would enable users to read individual press releases and also see a listing page for press releases.

Creating Page Types

There are a couple of different ways to create Page Types in the Broadleaf admin, and the correct way will be driven based on the type of page you're wanting to create.

The first way is to treat Page Type like any other Broadleaf entity and simply go into the Page Type maintenance screens in the admin. This is the most standard way of creating Page Types, and is best when you're wanting to either use that Page Type across multiple different templates, or if you're creating a collection page type.

For example, let's say that you want to create a Page Type that corresponds to featured products. This Page Type might then have some basic fields, such as a marketing blurb and a lookup for the product you want to feature. You might also have three different templates that can be used interchangeably for these pages. By creating the Page Type ahead of time, you'll then be able to map various different templates with that type.

The second way to create a Page Type is to do so implicitly by creating a new template from within the Theme Configuration admin section. This strategy is great for Page Types that will always only correspond to one template. Page Types created in this way will be hidden from the main Page Type maintenance screens, and instead, managing the dynamic fields will be centralized on the theme template maintenance, right next to the HTML content for the template.