Liquid basics
Liquid is the safe presentation language used by Upstorr sections, blocks, snippets and fragments. It prints values, makes simple choices and loops over lists. It cannot read the database, open server files or access merchant secrets.
Output a value
<h1>{{ product.title }}</h1>
Output is escaped by default. Use an approved filter such as safe_rich_text only for a value that is meant to contain formatted HTML.
Make a choice
{% if product.inStock %}
<span>Available</span>
{% else %}
<span>Unavailable</span>
{% endif %}
Missing data remains empty. Check a value before reading deeply nested properties.
Loop over a list
{% for item in products %}
<a href="{{ item.url | link_url }}">{{ item.title }}</a>
{% endfor %}
Do not invent product, inventory, discount, GST, shipping or order values when a list is empty. Render a truthful empty state.
Variables and filters
Use assign or capture for a small local value. A filter transforms the value on its left:
{% assign heading = section.settings.heading | default: 'Featured' %}
<h2>{{ heading | escape }}</h2>
Upstorr uses strict variable and filter checking. A misspelled variable or unsupported filter produces a clear section error instead of silently guessing.
Whitespace
Add a hyphen inside a Liquid delimiter to remove surrounding whitespace: {%- or -%}. Use this only where the generated HTML spacing matters; normal readable source is more important than removing every newline.