CartistoDocs

Liquid objects (ThemeData)

The data every template receives, plus the page-specific objects.

Every page renders with a set of global objects available in layout.liquid, your page template, and any partial you {% render %}. Page templates also receive page-specific objects.

Note

Escape-by-default Output is HTML-escaped unless you add | raw. Only the three platform tags and trusted CMS/JSON payloads use | raw. Never | raw merchant free-text.

Globals (every page)

Object Type What it is
settings object The merchant’s theme settings, keyed by the name in theme.json (e.g. settings.accent_color, settings.logo, settings.store_name).
shop object Store identity: shop.name, shop.logo, shop.description, shop.currency, shop.language, shop.email, shop.phone.
routes object Language-prefixed URLs so you never hand-build them: routes.root_url, routes.products_url, routes.cart_url, routes.checkout_url, routes.account_url, routes.login_url, routes.register_url, routes.blog_url, routes.track_url, routes.search_url.
t object The merged translations. Read as an object (t.cart.title) or with the t filter for pluralization.
language string Current language code ("en", "ar").
isRTL boolean True for right-to-left languages.
currency string The display currency code.
baseCurrency string The store’s settlement currency.
availableCurrencies array Currencies the shopper can switch to.
availableLanguages array Languages the store publishes.
design object Precomputed design tokens (font stacks, accent, spacing) — mostly consumed by platform_head; available if you need a token in markup.
assetBase string Base URL for this theme’s assets. Prefer the asset_url filter.
seo object Canonical URL, meta description, Open Graph / Twitter, JSON-LD — emitted for you inside platform_head.
footerPages array CMS pages flagged for the footer.
navCategories array Top-level in-menu categories (with children) — the default navigation when no menu is built.
menus object The merchant’s navigation menus, resolved and keyed by handle: menus.main.items, each item carrying a resolved url, label, and children.
platform_head / platform_body / content string The three required layout tags — output with `

Page-specific objects

Only the relevant page receives these.

views/pages/product/single.liquid

product — the product being viewed. Common fields:

{{ product.name }}
{{ product.price | money_format }}
{% if product.compareAtPrice %}<s>{{ product.compareAtPrice | money_format }}</s>{% endif %}
{% for image in product.images %}<img src="{{ image | image_url: width: 800 }}" />{% endfor %}
{% for v in product.variantOptions %}…{% endfor %}

The product’s prices are pre-converted to the display currency by the server — never do currency maths in a template. Bundles/offers are seeded for the <cartisto-bundles> component; you place the tag, the platform renders the offer.

views/pages/product/index.liquid & category.liquid

products (the current page of results), currentCategory, navCategories, filterConfig (the enabled facets), and the interactive listing engine bound via data-cartisto="products-listing". See Controllers.

views/pages/cart.liquid

The cart is themeable; the server computes all prices. The initial cart is seeded as window.__INITIAL_CART__ and the platform page-cart bundle binds behavior.

views/pages/customer/dashboard.liquid & customer/order-detail.liquid

customer, order, and order collections — seeded for the account/order bundles. Order actions (refund, invoice, cancel) are bound by the platform under window.cartistoOrder.*.

Sections

Merchant-composable sections are exposed per template. The platform hands you each section’s partial path on section.partial — render it directly:

{% for section in theme.templateSections.index %}
  {% if section.display %}
    {% render section.partial, component: section %}
  {% endif %}
{% endfor %}

Each section instance carries its own resolved settings and (for sections with blocks) a resolved blocks array. See Sections & blocks.

Tip

Catching typos Live rendering is lenient — a missing variable like {{ product.tittle }} renders empty rather than erroring, so a typo can fail quietly. When you preview a theme (the customizer iframe or cartisto theme dev), the platform re-renders strict and reports the first undefined variable as a console.warn in the page plus an X-Cartisto-Theme-Warning response header — with zero false positives for guarded patterns ({% if x %}, {{ x | default: … }}). The live store is never affected.