Docs
Dashboard
On this page

    Liquid reference

    Themes are Liquid templates rendered in ShopFast's sandboxed engine. This page is generated from the engine itself: 107 filters, 26 tags and 9 object types. If it is here, it works in a theme.

    How rendering works

    • Output is HTML-escaped by default. Rich text (description_html) is sanitized before it reaches a theme.
    • Strict filters: an unknown filter is an error when you publish. Snippets render with {% render %} and see only what you pass them.
    • Every section renders on a time, memory and template budget; a broken section becomes a placeholder, never a broken page.
    • Money is integer minor units: {{ product.price | money }} prints $24.99 for 2499.

    Global objects

    • title

    ShopFast filters

    • artShopFast

      A decorative SVG from the theme art set.

      {{ 'grid' | art }}
    • asset_urlShopFast

      URL of a theme image from config/assets.json.

      {{ 'hero.png' | asset_url }}
    • coverShopFast

      The generated SVG cover for a product (folded planes from its id and type).

      {{ product | cover: 'wide' }}
    • editableShopFast

      Marks text the visual editor can edit in place.

      {{ section.settings.heading | editable: 'heading' }}
    • faq_jsonldShopFast

      FAQPage JSON-LD from question blocks.

      {{ section.blocks | faq_jsonld }}
    • handleShopFast

      Alias of handleize.

      {{ title | handle }}
    • handleizeShopFast

      Lowercase, dash-separated handle: golden-hour.

      {{ "Golden Hour" | handleize }}
    • hmac_sha256ShopFast

      Hex HMAC-SHA256.

      {{ text | hmac_sha256: 'key' }}
    • image_tagShopFast

      A full <img> with width, height and alt.

      {{ section.settings.image | image_tag: loading: 'lazy' }}
    • image_urlShopFast

      URL of an image setting or theme image, resized.

      {{ section.settings.image | image_url: width: 800 }}
    • iso_dateShopFast

      An ISO 8601 date string for <time datetime>.

      {{ article.created_at | iso_date }}
    • jsonShopFast

      JSON for data attributes, escaped for HTML.

      {{ product | json }}
    • jsonldShopFast

      A safe <script type="application/ld+json"> block.

      {{ data | jsonld }}
    • moneyShopFast

      Minor units to the store currency: 2499 → $24.99.

      {{ product.price | money }}
    • money_with_currencyShopFast

      Like money, followed by the ISO code: $24.99 USD.

      {{ product.price | money_with_currency }}
    • money_without_currencyShopFast

      The amount without a symbol: 24.99.

      {{ product.price | money_without_currency }}
    • pluralizeShopFast

      Picks the singular when the number is 1.

      {{ n | pluralize: 'item', 'items' }}
    • sha256ShopFast

      Hex SHA-256 of a string.

      {{ text | sha256 }}
    • starsShopFast

      Accessible star rating markup.

      {{ product.rating.value | stars }}
    • tShopFast

      A string from the theme locale file, with variables: {{ 'cart.items' | t: count: 3 }}.

      {{ 'cart.title' | t }}
    • type_labelShopFast

      Human label for a product type: license_key → License key.

      {{ product.type | type_label }}
    • videoShopFast

      Parses a YouTube or Vimeo URL into an embeddable player.

      {{ section.settings.video_url | video }}

    Standard filters

    LiquidJS filters, all available: abs, append, array_to_sentence_string, at_least, at_most, base64_decode, base64_encode, capitalize, ceil, cgi_escape, compact, concat, date, date_to_long_string, date_to_rfc822, date_to_string, date_to_xmlschema, default, divided_by, downcase, escape, escape_once, find, find_exp, find_index, find_index_exp, first, floor, group_by, group_by_exp, has, has_exp, inspect, join, jsonify, last, lstrip, map, minus, modulo, newline_to_br, normalize_whitespace, number_of_words, plus, pop, prepend, push, raw, reject, reject_exp, remove, remove_first, remove_last, replace, replace_first, replace_last, reverse, round, rstrip, sample, shift, size, slice, slugify, sort, sort_natural, split, squish, strip, strip_html, strip_newlines, sum, times, to_integer, truncate, truncatewords, uniq, unshift, upcase, uri_escape, url_decode, url_encode, where, where_exp, xml_escape.

    Tags

    • {% assign %}Standard

      Standard Liquid tag.

    • {% block %}Disabled

      Not available: use {% content_for %} and theme blocks.

    • {% break %}Standard

      Standard Liquid tag.

    • {% capture %}Standard

      Standard Liquid tag.

    • {% case %}Standard

      Standard Liquid tag.

    • {% comment %}Standard

      Standard Liquid tag.

    • {% content_for %}ShopFast

      Renders blocks: {% content_for 'blocks' %} or a single theme block.

    • {% continue %}Standard

      Standard Liquid tag.

    • {% cycle %}Standard

      Standard Liquid tag.

    • {% decrement %}Standard

      Standard Liquid tag.

    • {% echo %}ShopFast

      Outputs an expression inside {% liquid %}.

    • {% for %}Standard

      Standard Liquid tag.

    • {% if %}Standard

      Standard Liquid tag.

    • {% include %}Disabled

      Not available: use {% render %}, which keeps snippet variables isolated.

    • {% increment %}Standard

      Standard Liquid tag.

    • {% javascript %}Disabled

      Not available: themes ship no JavaScript; interactive blocks use the ShopFast storefront runtime.

    • {% layout %}Disabled

      Not available: templates choose their layout in their JSON file.

    • {% liquid %}ShopFast

      Several tags in one block, one per line.

    • {% raw %}Standard

      Standard Liquid tag.

    • {% render %}ShopFast

      Renders a snippet with its own variables: {% render 'product-card', product: product %}.

    • {% schema %}ShopFast

      The section's settings, blocks and presets as JSON. Read by the editor, never rendered.

    • {% sections %}ShopFast

      Renders a section group (header-group, footer-group, overlay-group).

    • {% style %}ShopFast

      Scoped <style> for a section, with settings available as CSS variables.

    • {% stylesheet %}ShopFast

      CSS for a section or the library, compiled into the theme stylesheet (never inline).

    • {% tablerow %}Standard

      Standard Liquid tag.

    • {% unless %}Standard

      Standard Liquid tag.

    Objects

    Review

    FieldTypeNotes
    idstring
    ratingnumber
    titlestring
    bodystring
    authorstring
    verifiedboolean
    created_atstring
    replystring | null
    replied_atstring | null
    sourcestring | null
    source_labelstring | null
    image_urlstring | nullA proof image kept with an imported review (https).

    Promotion

    FieldTypeNotes
    idstring
    titlestring
    percent_offnumberWhole percent, e.g. 20.
    ends_atstring
    stackingstring"stack": discount codes still apply; "exclusive": they do not.

    PromotionBanner (extends Promotion)

    FieldTypeNotes
    textstringThe banner text with {percent} and {ends} filled in.
    tonestring
    countdownboolean
    urlstring

    Media

    FieldTypeNotes
    kind'image' | 'video' | 'youtube' | 'vimeo'
    urlstring
    altstring
    poster_urlstring | null
    external_idstring | null
    widthnumber | null
    heightnumber | null

    Product

    FieldTypeNotes
    idstring
    handlestring
    titlestring
    typestring
    type_labelstring
    descriptionstring
    description_htmlhtml
    excerptstring
    deliversstring
    urlstring
    pricenumber
    compare_at_pricenumber | null
    on_saleboolean
    savingsnumber | null
    savings_percentnumber | null
    availableboolean
    sold_outboolean
    stocknumber | null
    low_stockboolean
    is_keyboolean
    is_bundleboolean
    is_membershipboolean
    is_freeboolean
    cover_urlstring | null
    image_urlstring
    rating{ value: number; count: number; distribution: number[] } …
    reviewsReviewDrop[]
    reviews_countnumber
    bundle_items{ handle: string; title: string; url: string }[]
    units_sold_30dnumber
    template_suffixstring | null
    created_atstring
    updated_atstring
    short_descriptionstring
    tagsstring[]
    featuredboolean
    pricing_modestring
    pay_what_you_wantboolean
    min_pricenumber | null
    suggested_pricenumber | null
    variantsVariantDrop[]Price options in display order; empty = one price.
    selected_variantVariantDrop | nullThe option the product page starts on: the first one in stock, else the first (null without options).
    has_variantsboolean
    has_durationsbooleanTemplates: every option is a duration (1 Day / 7 Days / 30 Days / Lifetime): render the duration picker.
    price_minnumberLowest variant price ("From $9"), or the price.
    price_variesboolean
    gallery{ url: string; alt: string; width: number | null; height:…Images only, in order (the first is the cover).
    mediaMediaDrop[]Every media item in order: images and videos. Videos never become the cover.
    has_videoboolean
    first_videoMediaDrop | nullThe first video (uploaded, YouTube or Vimeo), or null.
    collection_handlesstring[]
    category_handlesstring[]Product categories it is filed in, the main one first: `categories[product.category_handles.first]`.
    upsell_handlesstring[]
    cross_sell_handlesstring[]
    preorderboolean
    subscription{ interval: string; interval_count: number; trial_days: n…
    min_per_ordernumber
    max_per_ordernumber | null
    gamestring | null
    platformsstring[]
    regionstring | null
    status_badge{ key: string; label: string; tone: string; note: string;…
    sales_paused{ label: string; color: string; since: string; message: s…usp-keys: sales paused by a linked status (Not working, Down…).
    license{ clock: 'purchase' | 'first_use'; hwid_enabled: boolean;…
    instant_deliveryboolean
    featuresstring[]Every feature line in the seller's order, grouped or not (empty = none). Short spots show the first few.
    feature_groupsFeatureGroupDrop[]
    feature_countnumberHow many feature lines there are in all.
    requirementsstring[]"System requirements": one line each (empty = none).
    listedbooleanfalse for unlisted products (reachable by URL only).
    featured_image{ url: string; alt: string; width: number | null; height:…First gallery image, or the generated cover.
    add_ons{ handle: string; title: string; headline: string; body: …Order bumps offered with this product in the cart.
    seo_titlestring
    seo_descriptionstring
    og_image_urlstringSocial image: the custom one, the first gallery image, or the generated cover PNG.
    checkout_fields{ id: string; label: string; type: string; required: bool…Questions the buyer answers at checkout.
    promotionPromotionDrop | null

    FeatureGroup

    FieldTypeNotes
    titlestring
    itemsstring[]
    countnumber

    Variant

    FieldTypeNotes
    idstring
    titlestring
    descriptionstring
    pricenumber
    compare_at_pricenumber | null
    availableboolean
    stocknumber | null
    low_stockboolean
    duration_keystring | nullTemplates: the duration this option stands for ("7 Days" → 7d), or null for options that are not durations.
    duration_daysnumber | nullDays of play, null for Lifetime or non-duration options.
    is_lifetimeboolean
    per_day_pricenumber | nullPrice per day in minor units (rounded), null for 1 Day, Lifetime and non-duration options.

    Collection

    FieldTypeNotes
    idstring | null
    handlestring
    titlestring
    descriptionstring
    urlstring
    productsProductDrop[]
    products_countnumber
    sort_bystring
    sort_options{ value: string; label: string }[]
    image_urlstring | null
    seo_titlestring
    seo_descriptionstring

    Page

    FieldTypeNotes
    idstring
    handlestring
    titlestring
    contenthtml
    urlstring
    template_suffixstring | null
    Was this page helpful?