Skip to main content

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).

VariableSourceNotes
product.namegetName()
product.skugetSku()
product.pricegetFinalPrice() formatted via PriceCurrencyInterfaceFormatted in store currency, no HTML
product.short_descriptiongetShortDescription()HTML stripped, trimmed
product.descriptiongetData('description')HTML stripped, trimmed
product.manufacturergetAttributeText('manufacturer')Empty if attribute not defined on the catalog
product.brandgetAttributeText('brand') or fallback to manufacturerEmpty if neither attribute exists
product.colorgetAttributeText('color')Empty if not defined
product.sizegetAttributeText('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 manufacturer is shipped by Magento default; brand, color, size are 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).

VariableSource
category.namegetName()
category.descriptiongetDescription() (HTML stripped)
category.levelgetLevel() (root = 1)
category.url_keygetData('url_key')

cms.*

Resolves on CMS page views (cms_page_view, cms_index_index).

VariableSource
cms.titlegetTitle()
cms.identifiergetIdentifier()
cms.content_headinggetContentHeading()

store.*

Always resolves.

VariableSource
store.nameStore::getName()
store.codeStore::getCode()
store.frontend_nameConfig general/store_information/name
store.phoneConfig 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.