Variables reference
All variables use {{namespace.key}} syntax. Whitespace around the variable name is allowed: {{ product.name }} works the same as {{product.name}}.
product.*
Resolves when the current page is a product view (catalog_product_view).
| Variable | Source | Notes |
|---|---|---|
product.name | getName() | |
product.sku | getSku() | |
product.price | getFinalPrice() formatted via PriceCurrencyInterface | Formatted in store currency, no HTML |
product.short_description | getShortDescription() | HTML stripped, trimmed |
product.description | getData('description') | HTML stripped, trimmed |
product.manufacturer | getAttributeText('manufacturer') | Empty if attribute not defined on the catalog |
product.brand | getAttributeText('brand') or fallback to manufacturer | Empty if neither attribute exists |
product.color | getAttributeText('color') | Empty if not defined |
product.size | getAttributeText('size') | Empty if not defined |
All four attribute lookups are guarded — if the attribute doesn't exist on the catalog (or has no source model), the variable resolves to an empty string rather than throwing. Only
manufactureris shipped by Magento default;brand,color,sizeare merchant-installed and silently skipped if absent. Multi-select attributes are comma-joined.
category.*
Resolves when the current page is a category view (catalog_category_view) AND there's no current product (so it doesn't fire on product pages with a category breadcrumb context).
| Variable | Source |
|---|---|
category.name | getName() |
category.description | getDescription() (HTML stripped) |
category.level | getLevel() (root = 1) |
category.url_key | getData('url_key') |
cms.*
Resolves on CMS page views (cms_page_view, cms_index_index).
| Variable | Source |
|---|---|
cms.title | getTitle() |
cms.identifier | getIdentifier() |
cms.content_heading | getContentHeading() |
store.*
Always resolves.
| Variable | Source |
|---|---|
store.name | Store::getName() |
store.code | Store::getCode() |
store.frontend_name | Config general/store_information/name |
store.phone | Config general/store_information/phone |
Examples
{{product.name}} | {{product.brand}} | Buy at {{store.frontend_name}}
→ Acme Widget Pro | Acme | Buy at Sample Store
Shop our {{category.name}} range — fast UK delivery from {{store.frontend_name}}
→ Shop our Footwear range — fast UK delivery from Sample Store
{{cms.title}} — Help & Support
→ Returns Policy — Help & Support
What about custom EAV attributes?
Adding a custom variable namespace lets you expose any attribute or computed value. See Extending for the recipe.
GraphQL behaviour
The same variables are resolved when a headless storefront queries seo { title description } — the EntityContextBuilder is shared between the frontend observer and the GraphQL resolver, so output is identical.