Skip to Content
ExplanationHow template values are resolved

How template values are resolved

Audience: CMS editors and integrators.

Templates combine CMS Variables with placeholders supplied by the application. Both use braces, but they get their values from different sources.

CMS Variables and locale fallback

A CMS Variable is a named record. Templates use its generic uppercase name, such as {{SHOP_NAME}}. For a German page, the application first uses SHOP_NAME.de when that record exists. Otherwise, it uses SHOP_NAME. The same rule applies to page metadata, page-template slugs, seller data, and generated inventory metadata.

An existing localized record with an empty value still overrides the base record. A missing variable renders as an empty string. This distinction explains why an empty translation and an absent translation can produce different results.

Application placeholders

Built-in placeholders get values from the page, deal, or generated entity. They do not need CMS Variable records. For example, {{TITLE}} gets the current page’s public name. The placeholder reference lists each source and supported context.

Template conditions

Inventory-car, Shopify-product, and Shopify-collection templates can have conditions. In the CMS, open a template and select Bedingung hinzufügen. Select a field and enter one allowed value per line. All fields must match. For each field, one allowed value is sufficient. Comparisons are case-sensitive. An empty condition list defines a default template. Values are stored exactly as entered. Empty lines and spaces at the start or end of a value cause a validation error. The editor does not trim or remove values. Set Priorität to control the order when several templates match. The default priority is 0. Higher numbers have priority over lower numbers.

For example, select Marke and enter BMW and MINI on separate lines. That template matches either make. Add Modelljahr with 2026 to limit it to that year. For a collection, select Collection-Handle and enter electric-cars.

Conditions use the source values before URL conversion. For example, enter BMW, not the slug value bmw. The Zustand value uses the page language. Shopify IDs include the full GID, such as gid://shopify/Collection/42. CMS Variables and Handlebars expressions are not evaluated in conditions.

The application first checks active templates for the page type and domain. It selects a matching conditional template before a default template in that scope. If neither is available, it checks templates with no domain. If several templates match, the highest priority determines the selection. If priorities are equal, the lowest template ID determines the selection. Priority does not override domain selection or the default-template fallback. Conditional templates can share a path pattern with the default template. Page URLs must still be unique within each domain.

Selection runs during slug calculation and source synchronization. Saving conditions does not automatically assign a different template to every existing page.

The database stores conditions as an object of string arrays, including single-value conditions. Apply the CMS migration before deploying this version. The application does not accept null conditions or the previous scalar-value format.

Generated paths

The application normalizes slug placeholder values into URL-safe segments before substitution. A CMS Variable can also supply a path component. For {{SHOP_PATH}}, a German page uses SHOP_PATH.de when available and falls back to SHOP_PATH. The resolved value is then normalized into a URL-safe segment.

Random slug identifiers are generated once when a synchronization slug is created. Reusing the stored slug does not generate another identifier. Stable identifiers and descriptive values therefore keep paths more stable than prices or stock values.

Use template syntax for naming and escaping rules. Use template variables for the editing procedure.

Last updated on