Commerce Composer layout architecture

A layout is an arrangement of Commerce Composer widgets within a layout template that retrieve and display different artifacts to render a store page. When a shopper views a page, the Commerce Composer framework resolves the appropriate layout to use for the page for that point in time. The Commerce Composer framework then uses the layout contents and design to render the page for the shopper to view.

For general information about layouts, see Layouts, layout templates, and default layouts.


Creating layouts

Commerce Composer layouts are created by selecting a layout template that includes defined slots and adding widgets into the template. We can use the Data Load utility or the Commerce Composer tool to create layouts. Figure 1. Management Center process for creating a layout. The following image illustrates the process for creating a layout and details the customization points for layouts.

The steps in the diagram are explained here:

A layout is composed of three components, a layout template, a set of widgets, and metadata information.

The metadata information in the layout template definition that binds a widget to a slot is stored in the PLWIDGETREL database table. For more information about creating a layout, see


Layout assignments

A single page can have multiple layouts assigned to it. A layout can be assigned to a single page, multiple pages, and to the landing page for a search term. For example,

Layouts can be assigned to any page that has a page group that is supported by the Commerce Composer framework. By default the following page groups are supported:

Layouts are specific to a device class. The layout template definition sets whether a layout can be used for a mobile, desktop, or any device. A page can be assigned a layout for each device class to handle rendering the pages when shoppers views the page on different devices. Layouts can also be defined to be responsive. Responsive layouts can be used for pages that are being viewed on any class of device. Responsive layouts use layout templates that adapt to a wider range of screen sizes by using flexible grids and images, and by using other responsive design techniques. By default, all of the layout templates provided with the Commerce Composer tool are responsive. Responsive layouts are intended to include only responsive widgets. See Creating responsive layout templates.


Layout assignment activities and layout resolution

When a shopper views a store page that is managed in the Commerce Composer tool, the Commerce Composer framework must determine which layout to use to render the page. To resolve the layout, the framework processes the layout assignments that are set up by business users for the page. When a business user or administrator assigns a layout to one or more pages or search terms, the marketing engine creates a layout assignment activity for each page and search term to handle the layout assignment. The marketing engine uses this layout assignment activity to associate a layout with a page on a particular device when the page URL is viewed by a shopper. The activity associates each assigned page or search term with a layout for a specific device class.

The layout assignment activity calls the Commerce Composer framework to render the page with the layout. Since multiple layouts can be assigned to a page, a user can schedule the layout assignment activities for the page. Each page has a schedule associated with it to determine when to use a layout assignment activity to render the page. When a shopper views a store page, the Commerce Composer framework is invoked to retrieve the scheduled layout that should display for the current page. The Commerce Composer framework uses the marketing engine web activity rules to identify the proper layout to use depending on the layout assignment schedule and the device that the shopper is using to view the page.

The layout resolution process uses the configurable properties for the widgets within the layout that are defined in Management Center to help render the page. When the layout is being rendered, the template container identifies the widgets that are to be rendered and the positional placement of the widgets. The widgets determine the data to display or use within the widgets, and determines additional display settings for the widgets within the layout. The process retrieves the values for the widget properties from the PLWIDGETNVP table and retrieves any complex property values with the defined widget manager class.

For more information about layout resolution, see Commerce Composer layout resolution.


Default layouts

If no layout is set for page, the Commerce Composer framework uses a fallback mechanism to assign a default layout for the page. When a business user creates a page, the default layout for the page group that page belongs within is automatically assigned to the page. The business user can then assign a different layout to the page, or continue to use the default layout for the page. If a user removes the layout assignment for a page, the default layout is again assigned to the page automatically to render the page in the store.

For example, when a business user creates a product or SKU page, the Commerce Composer framework assigns a default product page layout to the page. The business user however cannot view the default layout assignment for the page within the Commerce Composer tool. User can view the default layout for a page, when they view the page in the Management Center store preview or by visiting their store.

By default, WebSphere Commerce includes a default layout assignment for pages that belong to the supported page groups. This default-provided default layout is responsive and is used for the page for all device classes. If your company wants a different default layout for pages within a page group, a developer can set a new default layout for each device class for a page group. See Setting a default layout for a page group.


Related concepts
Layout assignments for category pages
Layout assignments for catalog entry pages
Layout assignments for search terms
Pages and page creation
Commerce Composer layout template architecture


Related tasks
Setting a default layout for a page group
Registering a Commerce Composer layout template
Defining the storefront assets for Commerce Composer layout templates
Testing a custom layout template in Management Center
Creating Commerce Composer layout templates


Related reference
Commerce Composer samples
layout input file
layoutWidgetRelationship input file
template input file
slotDefinition input file
layoutAssignment input file