Skip to content

Nested variables

You can put {otherVariable} inside a variable’s value. When the plugin resolves the outer variable, it also resolves any inner references it finds.

Define two variables:

KeyValue
shopName(built-in: e.g. Acme Store)
shopAddress(built-in: e.g. Street 1, 00-001 NY)
companyInfo{shopName} — {shopAddress}

Now writing {companyInfo} in a CMS page renders:

Acme Store — Street 1, 00-001 NY

One level. When the plugin replaces {companyInfo}, it resolves the {shopName} and {shopAddress} references inside the value. If those values themselves contained more {...} references, those would not be resolved — they would render as literal text.

The single-level limit is intentional — it prevents circular references and runaway expansion. If you need deeper composition, redesign your variables so each level is explicit.

  • Footer composition{footerSignature} = {shopName} • {shopEmail} • {shopAddress}
  • Legal blocks{legalFooter} = © {shopName} {currentYear} (set currentYear manually each year, or via your own job)
  • Reusable disclaimers{shippingDisclaimer} = Shipping handled by {fulfillmentPartnerName}
  • Self-reference. promotionText containing {promotionText} renders the literal placeholder — the inner reference is not expanded a second time, but it can confuse content editors. Don’t do it.
  • Cross-channel surprises. A nested key resolves with the outer variable’s channel context. If {companyInfo} is configured globally and {shopName} has channel-specific overrides, the channel-specific name is still used because the channel is taken from the storefront request, not from the outer variable.