Commerce Composer 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. If there are no layout assignments for the page, the default layout for the page group is returned.
Layout assignment activities
Every time a business user saves a layout assignment, the Commerce Composer framework creates a layout assignment activity for each page and search term to which the layout is assigned. These specialized activities capture details about the layout assignment required for layout resolution. The layout assignment activity associates each assigned page or search term with a layout for a specific device class (mobile, desktop, or responsive). Tip: If we are familiar with marketing web activities in the Marketing tool, layout assignment activities have a similar structure. This structure consists of campaign elements (triggers, targets, actions) that form a layout assignment rule. However, in the Commerce Composer framework, the layout assignment activity is not exposed in the Management Center user interface to business users. In other words, business users do not build a layout assignment activity as they would a marketing web activity. The following illustrations are provided only to help you visualize the structure of layout assignment activities. Figure 1. Structure of a layout assignment activity
- 1 E-Marketing Spot trigger
- Identifies the name of the layout e-Marketing Spot that represents the page or the search term to which the layout is assigned.
- 2 Device Class target
- Identifies the class of device that the layout is intended to be viewed on, based on the selected layout template. Valid values are:
- Web (desktop)
- Mobile
- Any (responsive)
- 3 Current Page target
- For layouts assigned to category pages only:
- Identifies the specific category page to which the layout is assigned.
- Specifies whether subcategory pages or child catalog entry pages inherit the layout from the category page.
- 4 Show Page Layout action
- Identifies the layout to use to render the page.
The following are specific examples of layout assignment activities for layouts assigned to various pages and search terms. Figure 2. Layout assigned to a content page
Figure 3. Layout assigned to a category page
Figure 4. Layout assigned to a product page
Figure 5. Layout assigned to products in a specific category
Figure 6. Layout assigned to a search term
E-Marketing Spot names in layout assignment activities
The following are examples of layout e-Marketing Spot names used in layout assignment activities:
- Content_50005
- Category_10001
- Product_30003
- Category_20002_Product
- Search_notebook
The layout e-Marketing Spot names are constructed using this convention:
pageGroup_ObjectIdentifier_subPageGroup
Where:
- pageGroup
- The page group to which the page that the layout is assigned to belongs. Valid values are:
- Content
- Category
- Search
- Product
- Bundle
- Kit
- DynamicKit
- Item (not used in the Aurora starter store)
- ObjectIdentifier
- The identifier of the page or search term.
- For a category page: the categoryId
- For a catalog entry page: the productId
- For a search term: the search term
- For a content page: the pageId
- subPageGroup
- Required only for layouts assigned to categories to be inherited by their catalog entries: The page group to which the catalog entries belong. Valid values are:
- Product
- Bundle
- Kit
- DynamicKit
- Item (not used in the Aurora starter store)