Banners are emitted as configuration on the browse response — they’re a passthrough for your storefront to render. Layers does not render banners into your theme directly. See What ships in the browse response for the payload shape.
Banner Anatomy
Every banner has:- A name for internal organization (not shown to shoppers).
- Web Media and Mobile Media — independent images per device. A banner only goes live once both are set.
- A Mode:
overtake— the banner takes the place of a product card in the grid.inject— the banner is inserted alongside product cards. Onlyinjectbanners can carry a click-throughlink.
- A Per-Device Layout controlling placement and size:
placement:hero(full-width row above the grid) orinline(a cell inside the grid).width×height: cell span. Inline tiles support1×1and2×2.position: row-major grid cell index (ornullfor unplaced).
- An optional Schedule (
schedule_start_at/schedule_end_at) — open-ended on either side. - Optional Contextual Conditions — the same shape as rule-level contextual conditions, evaluated per banner.
- A Sort Index that controls the order banners are applied when a rule has more than one.
How Banners Combine With Pins and Expressions
A merchandising rule can carry any combination of pins, sort expressions, variant breakouts, and banners. Banners are layered on top of the underlying product order — they don’t reorder products, they take grid space:- Hero banners render before the first product row. They never push products out of the result.
- Inline
overtakebanners consume the grid cell at theirposition, displacing the product that would have appeared there. - Inline
injectbanners insert themselves into the grid, shifting products after them by one cell.
Scheduling and Targeting
Banners inherit the rule’s own scheduling and contextual conditions implicitly — if the rule isn’t active for the request, the banner isn’t either. On top of that, each banner can carry its own schedule and contextual conditions:- The banner’s
schedule_start_at/schedule_end_atwindow controls when the banner is enabled. Layers checks scheduled banners continuously and toggles the banner’s enabled state to match — changes typically take effect within about a minute of the configured time. Browse responses ship whatever banners are currently enabled; the schedule window itself isn’t re-checked per request. - The banner’s contextual conditions are evaluated per request and must evaluate
truefor the banner to ship.
What Ships in the Browse Response
When a rule matches a request and has at least one enabled banner that passes its own gates, the browse response carries abanners array under that rule’s applied-rule entry. Layers does not render anything into your storefront — your theme is responsible for placing the banner into the grid based on its placement and position.
web_layout or mobile_layout), then:
- For
placement: "hero", render above the grid before the first product cell. - For
placement: "inline", place atposition(row-major) with the banner spanningwidth × heightcells. If multiple banners target the same cell, the lowersort_indexwins. - If a banner’s
modeisinjectand alinkis set, wrap the banner in an anchor.
Mirrored Metaobjects
Each enabled banner is also mirrored to a$app:banner metaobject in your Shopify store, linked back to the rule. Storefront code that prefers reading from metaobjects (e.g. a fully Liquid-rendered grid) can use those alongside the browse-response payload. See Metaobjects.
Limits and Behavior
- Max 5 banners per rule.
- Both Web and Mobile media required to go live. A banner without both slots filled is treated as disabled, even if it’s toggled on.
- Per-device layout is independent. A hero on web can be an inline tile on mobile, or vice versa.
- Config history covers banners. Banner add/edit/remove/reorder is captured in rule config history snapshots and restored when you roll a rule back.
- Cache invalidation runs on any banner change (not just pin/expression changes), so a banners-only edit goes live immediately.
See Also
- Rendering banners in Liquid — theme-side render guide for the browse payload.
- Rendering banners with the SDK — SDK equivalent.
- Pins — the other per-rule consequence banners are modeled on.
- Contextual conditions — same shape used for per-banner targeting.
- Scheduling — same model used for per-banner serve windows.
- Create a merchandising rule — dashboard walkthrough.