Skip to main content

Overview

Every render receives three layers of data:
  1. Globals, available on every page.
  2. Page data, specific to the template being rendered.
  3. Scope variables, injected by the layout, component, and snippet mechanisms.
Page data wins if a name appears in more than one layer.
While developing, {{ someVariable | dump }} prints the JSON representation of anything, which is the fastest way to see the real shape of a value.

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.
The official footers use 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
Skip pages whose 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:
  • filters on the products page holds the active filter state: keyword, in_stock, and price (currency, from, to).
  • liveStats on 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_page on the legal-page template is { type, slug, path, url, title, default_title, meta_title, meta_description, content }. type is one of terms, privacy_policy, refund_policy, shipping_policy, cookie_policy, impressum, withdrawal; title is the merchant’s own title or null, so fall back to default_title; meta_title is the merchant’s meta title, or their title, or null; meta_description is null unless set, so fall back to your own text; content is raw HTML, output with | safe. A theme copy without the legal-page template still renders the terms, privacy-policy and refund-policy templates, which receive the same object without content, since their content arrives in the older variable.
  • prev_post and next_post on the blog post page are the neighbouring posts in publish order (prev_post is older, next_post is newer) and are null at the ends. They carry the same fields as an entry in related_posts.
  • featured_products on 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 in items, so it renders with your product card snippet. Empty when nothing was picked.

Customer area

The reseller page includes credential-shaped values so the built-in themes can show a reseller their own integration details. Render them only inside the reseller’s own dashboard view, never in shared markup, and never log them.

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.