Overview
Every render receives three layers of data:- Globals, available on every page.
- Page data, specific to the template being rendered.
- Scope variables, injected by the layout, component, and snippet mechanisms.
Scope variables
Globals
Available on every page.
Most pages also get:
shop
The fields themes actually use:shop also carries the merchant’s own third-party IDs (gtag_id, gtm_id, meta_pixel_id, crisp_website_id, tawkto_id) so themes can drop in the corresponding script tags. These belong to the merchant, not to SellAuth.
shop.settings is a filtered view intended for the storefront, not the shop’s full settings. Do not assume an arbitrary setting is present.shop.legal_pages to list every published legal page after the merchant’s own links, gated on the footer’s legal_links_auto property (on when absent):
components/footer.njk
path you already link by hand, so a merchant’s manual links are not repeated.
Page data
Everything below is in addition to the globals.Storefront
Notes:
filterson the products page holds the active filter state:keyword,in_stock, andprice(currency,from,to).liveStatson the product page only contains the counters the merchant enabled, so check before rendering.- The policy pages give you raw HTML. Output with
| safe. legal_pageon thelegal-pagetemplate is{ type, slug, path, url, title, default_title, meta_title, meta_description, content }.typeis one ofterms,privacy_policy,refund_policy,shipping_policy,cookie_policy,impressum,withdrawal;titleis the merchant’s own title ornull, so fall back todefault_title;meta_titleis the merchant’s meta title, or their title, ornull;meta_descriptionisnullunless set, so fall back to your own text;contentis raw HTML, output with| safe. A theme copy without thelegal-pagetemplate still renders theterms,privacy-policyandrefund-policytemplates, which receive the same object withoutcontent, since their content arrives in the older variable.prev_postandnext_poston the blog post page are the neighbouring posts in publish order (prev_postis older,next_postis newer) and arenullat the ends. They carry the same fields as an entry inrelated_posts.featured_productson the blog post page holds the products the merchant picked for that post, in their chosen order. Each entry has the same shape as a product initems, so it renders with your product card snippet. Empty when nothing was picked.
Customer area
Paginators
Any variable ending in_paginator is a paginator object with these fields:
The official themes render all of this with a shared snippet:
Legacy variables
These still work but should not be used in new themes:sortedItems contains every public product and group, and it is loaded on every page. It exists because older themes depend on it. Reach for the page’s own data first.