Content commerce with Layouts
This page is for merchants, marketers and editors who want pages that sell: a campaign page for a sale, a gift guide, a category page with an editorial introduction. In Exponential products are content, so the Layouts editor can place them on pages like any other content. This page shows how, and where the shop's own templates take over.
Contents
Why it works
The Layouts editor arranges blocks in zones; listing blocks show a collection of content, either picked by hand (manual) or found by a query (dynamic); rules decide which page gets which layout, and can be limited in time (Landing pages with the layouts editor). Products are content objects in folders, so a collection can be "children of the Sale folder" or six products picked by hand. Clicking a product leads to its full view with the Add to basket button.
A sale landing page
- Create a landing page object, for example
/Spring-sale. - In the editor, create a layout with a hero zone and a main zone.
- Top: a hero block with the message and a button.
- Main: a list block with a grid view type and a dynamic collection, "children of the Sale folder", limit 12.
- Add a rich text block with the sale's terms: dates, shipping, returns.
- In Mappings, a rule for the landing page with a time condition (from, to) so the layout applies only during the sale (Layout rules).
- Preview, publish, and check the page logged out.
The sale price itself is not set by the layout: change the products' prices, or use discount groups for customer groups (Discounts). There are no coupon codes in the kernel.
Patterns
| Pattern | Blocks and collections |
|---|---|
| Category page with an introduction | Rich text, then a list block with "children of this category folder" |
| Gift guide | Several titled list blocks with manual collections |
| New arrivals | Dynamic collection sorted by publication date |
| Bestsellers | A template block using fetch( 'shop', 'best_sell_list', ... ) from the shop's order data (kernel/shop/function_definition.php) |
| "Also bought" on product pages | A template block with fetch( 'shop', 'related_purchase', ... ) |
| Shared promotional header | A shared layout linked into many pages (Shared header and footer) |
Bestsellers and "also bought" need a template block written by a developer (a tpl_block), since they come from
order data rather than the content tree.
Where layouts stop
| Layouts | Shop templates |
|---|---|
| Landing, campaign, category and front pages | Product full view with the add-to-basket form |
| Editorial content around products | Basket, customer data, confirmation, checkout |
| Time-limited arrangements | Order view, receipt, order mail |
The basket and checkout are shop views with their own templates; keep them out of layouts (Landing pages with the layouts editor).
Checklist
- To do: Every product shown is published and has a price.
- To do: The sale's terms are on the page, not only in the image.
- To do: Time conditions start and end when the prices change.
- To do: After a price change, the landing page's lists show the new prices, logged out; if not, check the caches (Caching for availability).
- To do: The page passes the accessibility checks (Store accessibility).
Related pages
- The layouts editor
- Promoting your store
- Layout types, zones and blocks
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.