Salesforce B2C Commerce scans all cartridges that are in the custom cartridge path for available templates.
A list of slots appears by context. To view this list, select site > Merchant Tools > Online Marketing > Content Slots.
In this example, suppose that the home page includes a main slot that contains one item, typically a content asset. Also suppose that each category landing page has a slot at the top containing two items horizontally. Lastly, suppose that there is a folder landing page for content assets grouped by library folder. This is the information a developer needs to create the needed templates:
Page | Slot ID | Context | Context-Object | Description | Rendering |
---|---|---|---|---|---|
Home Page | homepage_banner | Global | N/A | Home page banner | One content asset |
Category Landing Page | category_top_featured | Category | Current Category | Category slot at the top of each category page | 2 products horizontally |
Folder Landing Page | folder_landing | Folder | Current Folder | A banner area at the beginning of a folder | Multiple content assets in the library folder |
Based on the previous information, the developer:
In the Business Manager Content Slot module, the following information appears (supposing that two categories, Men's and Women's, are defined for the storefront):
Slot Type | Slot ID | Description | Template | Slot configurations |
---|---|---|---|---|
Global | homepage_banner | This is the top left banner on the home page, width 705px by height 356px. | homepage.isml | 0 |
Category - Men's | category_top_featured | Category Slot at the top of each category page. | categoryTop.isml | 0 |
Category - Women's | category_top_featured | Category Slot at the top of each category page. | categoryTop.isml | 0 |
Folder | folder_landing | Folder landing page. | folderLanding.isml | 0 |
For performance reasons, B2C Commerce caches the resulting HTML after the first time it renders a slot. This caching saves the performance penalty of having to calculate the active slot configuration with each request. This caching should be transparent to the merchant and slots should generally render the expected content at the expected time. However, we describe this mechanism because in certain situations, merchants might unexpectedly see incorrect slot content because of caching.
Rendered slot content is cached from 0-59 minutes. In general, results are cached for 59 minutes unless the current active slot configuration is due to become inactive or a new slot configuration is due to become active within this time period. The slot engine calculates the length of time that the configurations for a given slot can be cached based on a minimum of all active configuration deactivation times and all upcoming configuration activation times.