Commerce Composer layout template architecture

A layout template is the starting point for a Management Center user to use for composing a layout for a store page. Each template is a grid that contains a specific arrangement of slots.

By default, the Aurora starter store comes with a number of layout templates for use with the Commerce Composer tool. Management Center users can use these templates to compose page layouts. The following are examples of the templates available by publishing the Aurora starter store; the numbers represent the template slots that users can include widgets within:

A layout template consists of a container that is divided into a grid of configurable slots.


Creating layout templates

We can customize the Commerce Composer framework to include new templates for use in the Commerce Composer tool. Templates are device-specific. Your template definition must set whether the template can be used to create layouts for use on a mobile or desktop device. The definition can also define a template and layout to be responsive.

To create a layout template, define the container JSP file for the template and load the data information for the template with the Data Load utility. By loading this information, we can register and define the template and subscribe a store to the template. See Creating layout templates.


Storefront components

The storefront components for the template consist simply of a container widget for defining the template. A container widget is a type of widget used to generate the HTML grid that creates the configurable slots within a template. For each configurable slot, the container widget code uses the Commerce Composer widget import tag to find and import the widgets that a business user includes in the slot. A container widget can also hardcode a widget or predefine a widget to be included within the template. Figure 1. Overview diagram of a layout template. The following diagram illustrates how the main storefront components for a template interact.

For more information about defining the container JSP file for a layout template, see Creating Commerce Composer layout templates.


Template registration, subscription, and definition

The storefront definition for a template is registered within the Commerce Composer framework using the Data Load utility. Before a layout template can be used in the Commerce Composer tool or the storefront, the layout template information must be registered with the Commerce Composer framework. Each store that is to have pages that are based on the layout template must be subscribed to the template before the template can be used. The registration and subscription of a template is done with the Data Load utility. We must use the Data Load utility to load slot definitions to define the HTML grid and slots for a template. See


Templates in Management Center

For the wireframe associated with a template to display within the Commerce Composer tool, the storefront definitions of the template container, grid, and slots must be registered in the database. This wireframe of the template grid and slots must be registered in the PLWIDGETSLOT database table. This visual representation includes positional properties of the slots to create the grid outline that displays in the Commerce Composer tool.

Within the Commerce Composer tool, Management Center users can use the wireframe to identify which slots are available in a template for including widgets within. The wireframe however is only an abstract representation of the arrangement of rows and slots within a template. The wireframe does not represent the actual or proportional size and location of the slots on a rendered store page. The size and location of the slots within the templates provided by default with WebSphere Commerce are responsive and adjust based on the content of the widgets included within the slots.

If a slot is configured to be read-only with the Data Load utility, the color of the slot is yellow instead of gray within the wireframe to identify that the slot cannot be edited. If a slot includes a predefined widget, users cannot edit the widget properties or remove the widget within the Commerce Composer tool. When a layout template is registered and the store subscribes to the template, we can compose page layouts that are based on the template. See


Related concepts
Commerce Composer layout architecture
Layout assignments for category pages
Layout assignments for catalog entry pages
Layout assignments for search terms
Pages and page creation
Layouts, layout templates, and default layouts


Related tasks
Setting a default layout for a page group
Creating Commerce Composer widget groups


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