Host filters are provided by the platform, not the engine — they exist because they need real-world data a pure template cannot have: the buyer's locale, the theme's translations, the platform artwork library. A section just declares intent; the host does the work. These three are the complete host-filter set. A filter not on this page (and not a built-in from The Template Language) does not exist and fails at review.
money — format a price for the buyer#
Pipe a money value through money to render it correctly for whoever is looking at the page.
{{ product.price | money }}
Viewer locale |
Same value renders as |
|---|---|
en-US |
$1,234.56 |
de-DE |
1.234,56 € |
fr-FR |
1 234,56 € |
nl-NL |
€ 1.234,56 |
en-IN |
₹12,34,567.89 |
ja-JP |
¥2,499 |
The input is a money value from ctx — an object carrying amount and currency_code (product prices, cart totals, and every other platform price already have this shape). The currency travels with the value; the locale is the buyer's. From those two, the platform formats everything: decimal and thousands separators, digit grouping (including Indian lakh/crore), the currency's correct decimal places (yen has none, Kuwaiti dinar has three), and where the symbol sits for that locale (before, after, spaced). There is no merchant "currency format" template anywhere — formatting is computed, per buyer, always.
<span class="price">{{ product.price | money }}</span>
{% if product.price_range.has_range %}
{{ product.price_range.min | money }} – {{ product.price_range.max | money }}
{% endif %}
t — translate a theme string#
Pipe a translation key through t to render the theme's own translated text for the buyer's locale.
<button>{{ 'add_to_cart' | t }}</button>
The strings come from the theme's locale files — locales/
A translation string may contain placeholders, filled by named arguments. An unfilled placeholder stays as-is in the output. Merchants can later override any string's VALUE from the admin ("edit theme content") without touching your files — the keys, and their defaults, are always yours.
{# locales/en.json: { "greeting": "Welcome back, {{ name }}!" } #}
{{ 'greeting' | t: name: customer.first_name }}
placeholder_svg — platform placeholder artwork#
Pipe a placeholder name through placeholder_svg to render neutral, scalable inline artwork — for empty states, previews, and sections a merchant has not filled with real content yet. The output is inline SVG (trusted platform markup, no network request) that scales to whatever size your CSS gives it — there are no size variants to pick.
{% if settings.image %}
<img src="{{ settings.image }}" alt="{{ settings.caption }}">
{% else %}
{{ 'product-1' | placeholder_svg }}
{% endif %}
Names |
Use for |
|---|---|
image |
generic image slot |
logo |
brand/logo slot |
product-1 … product-6 |
product cards (six variants so a grid does not repeat) |
collection-1 … collection-6 |
collection cards |
lifestyle-1, lifestyle-2 |
wide hero / banner imagery |