A typical application has several types of pages that are displayed under different circumstances or contain different content.
For example, a site may have the following three basic page types:
These pages may differ in the following ways:
They are intended to be displayed in different contexts. The home page appears before the user has made any selections. The results page appears only when the user has performed some search or navigation query. The record detail page appears only when a user has selected a specific product. These conditions are configured in Experience Manager as triggering criteria.
They display different types of content. A home page or category page typically displays high-level promotions and merchandising. A results page displays a list of record results as well as additional controls for the user to select additional facets or otherwise refine the search. A record detail page displays detailed product information as well as controls for transactions (such as add to cart, wishlist, and so on). These differences in content imply differences in layout, which is configured at the template level.
They are accessed through different URLs. The home page is accessed at the base URL for the site. Search results pages may be accessed at a URL that includes the path
/browse/
. Record details pages may be accessed at a URL that includes the path/detail/
. These URL mappings are typically achieved by setting up individual services for each page type.
The Discover Electronics reference application includes servlets for results pages and record details pages.
An Experience Manager template defines the logical structure of a page and the types of content that the page can contain.
Every template defines a content item that can be processed by the Assembler. A content item describes the logic of how to promote content for display to application users. Content items have several parts: the records in a data set, the conditions that must be met for those records to display, and the templates that determine how those records are rendered in the application.
A page template defines a container content item with sections that can be populated with other content items, such as the following:
Typically, a section represents a physical area on the page, but it can also represent a functional grouping, including content that may not be visible to an end user. Each section has an associated content type that determines what kind of content items can be inserted in that section. An application may have multiple cartridges of each type, providing greater flexibility for the content administrator to configure the content for a specific page.
You can create templates for different page types within your application and define which content types are valid for each type of page. You can create templates for high-level page structures and different layouts for a single page type. Each of the content items that can be inserted into a template is itself defined by a template, and may be either another container content item or (more commonly) a leaf content item associated with a front end feature.
You can map the URL paths of pages in your application to specific services.
Services can be used to set attributes on the incoming request before it is processed by the Assembler depending on the type of page being requested, which can control what content is triggered in response to the request, and the format in which the response is returned.
When a content administrator defines a new application page in the
reference application, requests on that page are mapped to the
/services
servlet. Your application should include
logic for mapping arbitrary pages to a controller, though you may also choose
to explicitly define additional services for certain pages within your site.
Additionally, your UI tier must be able to resolve whatever links you expect
your content administrators to create. For more information about handling
application URLs, see "Working with Application URLs."
The Content Tree in the left pane of Experience Manager is divided into two sections: Site Pages and Content. You create pages within the Site Pages section.
You must deploy and provision your application with the EAC in order to modify it in Workbench.
To create a page, follow these steps:
Mouse over the Site Pages heading in the Content Tree.
The drop-down menu arrow appears on the right.
Click the drop-down menu arrow and select Add Page.
The Add Page panel appears.
Enter a Name/Path for the new page.
This is the part of the URL path that uniquely identifies the page within your application.
The new page is added to your application.
A page exists as a content item in Experience Manager. A content administrator can configure it directly by selecting a template with included editors, or they can specify a template with a dynamic slot to populate the page from one or more selected content folders.