Skip to main content
This is the complete set of data a theme template can read. Availability matters as much as shape: several of these exist only on certain pages or for signed-in visitors, and debug mode raises an error when you read something undefined.

Availability at a glance

Globals

object
Every platform setting, as a nested object: option.site.name, option.brand.logo, option.policies.tos, option.features.chat.is_enabled, and so on. A setting that was never saved is undefined, so guard it.Two values are computed rather than stored:
  • option.site.url, built from the configured domain and whether the site is served over HTTPS.
  • option.color_scheme.accent and .accent_content, expanded into { hex, r, g, b, rgb }.
object
Application configuration. Most themes only need config.model.registry, which lists AI services and models for pricing or capability tables.
string
The application version, also used as the cache-busting query on theme assets.
string | null
The installation’s license text, or null.
string
The active theme’s package name, such as acme/aurora.
string
prod, dev, demo or install.
object
The navigation registry. Themes rarely need it; it’s what the app and admin sidebars are built from.
object
The raw environment. Read one key when you must, such as env.THEME_ASSETS_SERVER.
This contains database credentials and secret keys. Never print or serialize the whole object.

Currency

object
The platform billing currency.

Locales

array
Every configured language.
object | null
The language resolved for this request, in the same shape as a locales entry. It’s null when the theme has no catalog for the resolved language, so always use locale.code|default('en-US').
string | null
Deprecated. The resolved language code as a plain string.

User

object
The signed-in visitor. Undefined for guests.

Workspace

object
The visitor’s current workspace. Undefined for guests.

Subscription

object
Available as workspace.subscription, or null when the workspace has none.

Plan

array
Active plans, sorted by price ascending. Available on the landing page only.

Plan snapshot

object
A frozen copy of a plan, available as subscription.plan. It carries id, title, description, icon, price, billing_cycle, credit_count, member_cap, created_at, updated_at, config and feature_list, with the same meanings as on a plan. It has no sale_price, coupon, discount or snapshot.

Plan config

object
What a plan grants. Available as plan.config and subscription.plan.config.

Affiliate

object
Available as user.affiliate. Every user has one.

Address

object
Available as workspace.address, or null.

Country

object | null
Available as user.country.

Workspace invitation

object
Entries of workspace.invitations.

Notes on types

  • Timestamps are Unix seconds, or null. Format them with Twig’s date filters.
  • Money is an integer in the currency’s minor units. Use <x-money> or format_currency.
  • Credits use null for unlimited, which is different from 0.
  • Percentages on a subscription are strings that already include %.