Free guide · tags, filters and objects · about 60 minutes

Shopify Liquid cheat sheet, explained

Shopify's cheat sheet gives you the names. This page tells you what each one is for in a real store, when you use it, and shows a short example.

How to use this page

Shopify's Liquid cheat sheet (shopify.com/partners/shopify-cheat-sheet (opens in a new tab)) lists everything you can use in a theme: tags, filters and objects. A list of names is hard to learn from. So for each one, this page tells you three things:

  • What it is, in one simple line.
  • Real use: where you actually use it in a store.
  • Example: a short piece of code you can copy.

Think of the cheat sheet as a toolbox. This page opens the box and shows you what each tool is for.

How to try the examples

Open Shopify admin → Online Store → Themes → Horizon → Customize, add a Custom Liquid section to the right page (product page for product examples, cart page for cart examples), and paste the code.

Handles

A handle is the web-friendly name of something in your store. It is all small letters, with dashes instead of spaces.

You createShopify makes the handle
A product called Masala Chai 500gmasala-chai-500g
A collection called Summer Sale!summer-sale
A page called About Usabout-us

Think of it as a house address. The house name can be fancy, but the address must be simple and unique.

Real use: handles are in every URL (/products/masala-chai-500g), and you use them in Liquid to fetch one specific thing:

Example
{{ collections['summer-sale'].title }}
{{ pages['about-us'].content }}

When: you need one fixed collection, page or menu in a section, for example a "Best sellers" row.

Basics (quick list)

All of these are explained with examples on the Liquid page. Here is how they show up in a store.

ItemReal use in a store
== !=Is the product type "Tea"? Is this the selected variant?
> < >= <=Is stock under 5? Is the cart over ₹999?
and orProduct is on sale and in stock
containsDoes the product have the tag "new"? Does the title contain "Gift"?
StringsTitles, descriptions, settings text
NumbersPrices (in paise), quantities, stock
Booleansproduct.available, a checkbox setting
NilA metafield that was never filled
Arrayscollection.products, product.tags, cart.items
EmptyDropA handle that does not exist, like collections['wrong-name']
Truthy / falsyOnly false and nil are "no". Use != blank to check a setting is really filled
Whitespace controlAdd - (like {%-) to remove empty lines from the HTML

Tags

Conditional tags (quick list)

TagReal use in a store
ifShow "Sold out" only when the product is not available
elsif / elseThree stock messages: sold out, few left, in stock
case / whenDifferent text per product type: Tea, Coffee, Accessories
unlessShow the "Add to cart" button unless the product is sold out

Details and examples: Liquid page, control flow.

form

Creates a real Shopify form, with the right address and hidden fields, so Shopify knows what to do with it.

Real use: add to cart, contact us, newsletter signup, customer login and register, product reviews (blog comments), address book.

When: any time the shopper sends something to Shopify. Never write these forms by hand; the hidden fields are easy to get wrong.

Contact form
{% form 'contact' %}
  {% if form.posted_successfully? %}
    <p>Thanks! We will reply within a day.</p>
  {% endif %}
  {{ form.errors | default_errors }}
  <label for="c-email">Email</label>
  <input id="c-email" type="email" name="contact[email]" required>
  <label for="c-msg">Message</label>
  <textarea id="c-msg" name="contact[body]"></textarea>
  <button>Send</button>
{% endform %}

Common form types: 'product' (add to cart, needs the product), 'contact', 'customer' (newsletter), 'customer_login', 'create_customer', 'customer_address', 'new_comment' (needs the article), 'localization' (country and language picker).

style

Like an HTML <style> tag, but the theme editor updates it live when the merchant changes a setting.

Real use: colours or sizes that come from section settings.

When: your CSS needs a value from a setting. Plain CSS cannot read Liquid; {% style %} can.

sections/announcement.liquid
{% style %}
  .announcement-{{ section.id }} {
    background: {{ section.settings.background }};
    color: {{ section.settings.text_color }};
  }
{% endstyle %}
<div class="announcement-{{ section.id }}">{{ section.settings.text }}</div>

Using section.id in the class keeps two copies of the section from changing each other's colours.

Iteration tags (quick list)

TagReal use in a store
forShow every product in a collection, every item in the cart
else (in for)"Your cart is empty" when there are no items
breakStop after you find the first sale product
continueSkip sold-out products in a "featured" row
cycleAlternate classes: left/right images, light/dark rows
tablerowA real HTML table, like a size chart

Details: Liquid page, iteration.

paginate

Splits a long list into pages. Shopify only lets you loop over 50 items at a time, so big lists need it.

Real use: collection pages ("Page 1, 2, 3"), search results, blog post lists, customer order history.

When: a list can be longer than about 50 items.

Collection with pages
{% paginate collection.products by 12 %}
  {% for product in collection.products %}
    <p>{{ product.title }}</p>
  {% endfor %}
  {{ paginate | default_pagination }}
{% endpaginate %}

default_pagination prints ready-made "Previous 1 2 3 Next" links. Inside, the paginate object tells you paginate.current_page, paginate.pages and more, if you want to build your own buttons.

Syntax tags (quick list)

TagReal use in a store
commentLeave a note: "Turned off for Diwali, bring back in January"
echoPrint a value inside a liquid tag
liquidWrite many lines of logic at the top of a block, cleanly
rawShow curly braces as text, for example in a code tutorial on a blog

Details: Liquid page, template tags.

Theme tags

These connect the files of a theme together.

TagWhat it isReal useWhen
layoutPicks the outer frame (layout file) for a template{% layout none %} for a page with no header and footer, like a print-friendly invoice or an XML feedOnly in .liquid templates. JSON templates set the layout with "layout": "…"
renderInserts a snippetProduct cards, icons, price, badges, used in many placesWhenever the same HTML appears more than once
include (old)Inserts a snippet, sharing all variablesSeen in old themesNever in new code. Use render
sectionPuts one fixed section into a layout or template{% section 'header' %} in old themesRare now. Section groups replaced it
sectionsPuts a section group in the layout{% sections 'header-group' %} and {% sections 'footer-group' %} in layout/theme.liquid. The merchant can then add sections to the header and footerIn the layout file
javascriptJavaScript that belongs to one section or blockA small script for a slider in that sectionSmall, section-only scripts. For bigger scripts, use a file in assets
stylesheetCSS that belongs to one section or blockHorizon uses it in almost every blockSection or block CSS. It cannot use Liquid; use {% style %} for setting values
render: pass what the snippet needs
{% for product in collection.products %}
  {% render 'product-card', product: product, show_vendor: true %}
{% endfor %}

Variable tags (quick list)

TagReal use in a store
assignSave product.selected_or_first_available_variant as variant, so the code is shorter
captureBuild a WhatsApp share text from the title and the shop name
incrementUnique IDs for each FAQ accordion on the page
decrementRare; counting down

Details: Liquid page, variables.

Filters

Array filters (quick list)

FilterReal use in a store
concatJoin two lists of products into one row
joinPrint tags as "organic, assam, bestseller"
first / lastThe first image, the newest tag
[0] (index)Pick one item by position: product.images[1] for the second photo
mapAll titles or all vendors from a list of products
reverseNewest first
size"3 items in your cart", "Showing 24 products"
sort / sort_naturalOrder products by price, or names A to Z
uniqShow each vendor only once
whereOnly in-stock products, only products of type "Tea"

Details: Liquid page, list filters.

Cart filters

item_count_for_variant

Tells you how many of this variant are already in the cart.

Real use: show "2 already in your cart" on the product page, or stop a shopper going over a buying limit. Horizon uses it next to the quantity box.

Product page
{%- assign in_cart = cart | item_count_for_variant: product.selected_or_first_available_variant.id -%}
{% if in_cart > 0 %}<p>{{ in_cart }} already in your cart</p>{% endif %}

Collection filters

These build links for collection pages.

FilterWhat it doesReal useExample
link_to_typeLink to all products of a typeClickable "Tea" label on a product{{ product.type | link_to_type }}
link_to_vendorLink to all products of a brandClickable brand name under the title{{ product.vendor | link_to_vendor }}
url_for_typeJust the URL for a typeYour own styled button to "All teas"{{ 'Tea' | url_for_type }} → /collections/types?q=Tea
url_for_vendorJust the URL for a brandA "More from this brand" link{{ product.vendor | url_for_vendor }}
sort_byAdds a sort order to a collection URL"Price: low to high" links{{ collection.url | sort_by: 'price-ascending' }}
withinMakes a product link inside the collectionBreadcrumbs "Teas > Masala Chai", and next/previous product in that collection{{ product.url | within: collection }}
highlight_active_tagWraps the selected tag in a highlightShow which tag filter is active{{ tag | highlight_active_tag | link_to_tag: tag }}

Color filters

Change colours with Liquid, so one brand colour setting can make lighter, darker or see-through versions.

Real use: the merchant picks one brand colour in settings; you make the hover colour, the light background and readable text from it automatically.

FilterWhat it doesReal use
color_lighten / color_darkenLighter or darker by a %Hover colour of a button
color_saturate / color_desaturateMore or less colourfulA soft, muted background
color_modifyChange one part: red, green, blue, alpha (see-through)…A 15% see-through overlay on a banner
color_mixMix two coloursA tint between the brand colour and white
color_to_rgb / color_to_hsl / color_to_hexChange the colour formatWhen a CSS property or a script needs a certain format
color_extractRead one part, like the red valueRare; custom calculations
color_brightnessHow bright a colour is (0 to 255)Decide if text on it should be black or white
color_contrastContrast between two coloursCheck text is readable (aim for 4.5 or more)
color_difference / brightness_differenceHow different two colours areReadability checks
Example
{{ '#7ab55c' | color_to_rgb }}
{{ '#7ab55c' | color_modify: 'alpha', 0.15 }}
Output
rgb(122, 181, 92)
rgba(122, 181, 92, 0.15)

Pick text colour based on brightness (save it first, filters do not work inside if):

Black or white text
{%- assign brightness = section.settings.background | color_brightness -%}
<div style="background: {{ section.settings.background }}; color: {% if brightness > 128 %}#000{% else %}#fff{% endif %}">
  Sale
</div>

Customer filters

FilterWhat it doesReal use
customer_login_linkA link to the login page"Log in" in the header
customer_logout_linkA link that logs out"Log out" on the account page
customer_register_linkA link to create an account"Create account" under the login form
login_buttonShows the Shop login button (follow the store in the Shop app)Let shoppers follow your store with one tap
Header account link
{% if customer %}
  Hi {{ customer.first_name }} · {{ 'Log out' | customer_logout_link }}
{% else %}
  {{ 'Log in' | customer_login_link }}
{% endif %}

Default filters

FilterWhat it doesReal use
defaultA backup value when something is empty"Our best sellers" if the heading setting is empty
default_errorsPrints a form's errors as a ready-made listWrong password, invalid email, on any {% form %}
default_paginationPrints ready-made page links"Previous 1 2 3 Next" inside {% paginate %}
Example
<h2>{{ section.settings.heading | default: 'Our best sellers' }}</h2>
{{ form.errors | default_errors }}

Font filters

Merchants pick fonts in Theme settings → Typography. These filters turn that choice into working CSS.

FilterWhat it doesReal use
font_faceWrites the @font-face CSS for the chosen fontLoad the font the merchant picked
font_modifyGets a bolder, lighter or italic versionBold headings from the same font family
font_urlThe web address of the font filePreload the main font for speed
In a style tag
{%- assign heading_bold = settings.type_heading_font | font_modify: 'weight', 'bold' -%}
{% style %}
  {{ settings.type_heading_font | font_face: font_display: 'swap' }}
  {{ heading_bold | font_face: font_display: 'swap' }}
  h1, h2 { font-family: {{ settings.type_heading_font.family }}, {{ settings.type_heading_font.fallback_families }}; }
{% endstyle %}

font_display: 'swap' shows the text right away in a backup font, then swaps. See the speed guide.

Format filters

FilterWhat it doesReal useExample
dateFormats a date"Published 17 July 2026", order dates, © year{{ article.published_at | date: '%d %B %Y' }}
jsonTurns any value into JSON (data JavaScript can read)Pass product data to a script safely<script>const product = {{ product | json }};</script>
weight_with_unitWeight with the store's unit"Weight: 0.5 kg" on the product page{{ variant.weight | weight_with_unit }}

Shopify's date also has ready-made formats that follow the store language: {{ article.published_at | date: format: 'abbreviated_date' }}.

HTML filters

These write HTML tags for you.

FilterWhat it doesReal use
link_toMakes an <a> linkQuick links in a menu or text
highlightBolds the search words in a resultSearch results: "chai masala" when someone searched "chai"
placeholder_svg_tagShows a grey placeholder drawingNew sections that have no image yet, so the editor preview still looks right
preload_tagTells the browser to download a file earlyPreload the main font or hero image for speed
script_tagMakes a <script> tagLoad a JS file from assets
stylesheet_tagMakes a <link rel="stylesheet"> tagLoad a CSS file from assets
time_tagMakes a <time> tag with a formatted dateBlog dates, good for search engines
Example
{{ 'Shop all teas' | link_to: '/collections/teas' }}
{{ 'custom.js' | asset_url | script_tag }}
{{ item.title | highlight: search.terms }}
{%- if section.settings.image == blank -%}{{ 'image' | placeholder_svg_tag: 'placeholder' }}{%- endif -%}

Hosted file filters

FilterWhat it doesReal use
asset_urlURL of a file in the theme's assets folderYour custom.js, custom.css, icons
file_urlURL of a file in Content → Files (uploaded in the admin)A size-chart PDF or a catalogue the merchant uploads and replaces without code
asset_img_url / file_img_url (old)Resized image from assets or filesOld themes. Use image_url on image objects now
global_asset_urlURL of a file Shopify hosts for all storesRare; old helper scripts
shopify_asset_urlURL of a Shopify-provided assetRare; old helper scripts
Example
<script src="{{ 'custom.js' | asset_url }}" defer></script>
<a href="{{ 'size-chart.pdf' | file_url }}" target="_blank">Size chart (PDF)</a>

Localization filters

FilterWhat it doesReal use
t (translate)Prints a text from the theme's language filesEvery fixed word in a theme: "Add to cart", "Sold out"
format_addressPrints an address in the right order for that countryStore address in the footer, customer address on the account page
currency_selector (old)Old currency dropdownUse {% form 'localization' %} with the localization object now
Example
<button>{{ 'products.product.add_to_cart' | t }}</button>
{{ customer.default_address | format_address }}

Math filters (quick list)

FilterReal use in a store
plus / minusPrice plus gift-wrap charge; how much you save
times / divided_byDiscount percentage: multiply by 100 before dividing
moduloA promo banner after every 4th product
round / ceil / floorRatings (4.37 → 4.4), full stars, pages needed
absSize of a difference, without the minus
at_least / at_mostQuantity at least 1; "show at most 10 left"

Details: Liquid page, number filters.

Media filters

FilterWhat it doesReal use
image_url + image_tagResized image URL, then a full <img> tagEvery image in a modern theme
img_url / img_tag (old)The old way to do the sameOld themes only
media_tagShows any product media (image, video, 3D) the right wayProduct galleries with mixed media
video_tagA video player for a video you uploadedProduct videos, hero background videos
external_video_url / external_video_tagYouTube or Vimeo video, with options like autoplayA YouTube how-to video on a product
model_viewer_tagA 3D model viewer you can spin3D view of furniture or shoes
Product gallery
{% for media in product.media %}
  {% case media.media_type %}
    {% when 'image' %}
      {{ media | image_url: width: 1000 | image_tag: loading: 'lazy' }}
    {% when 'video' %}
      {{ media | video_tag: controls: true }}
    {% when 'external_video' %}
      {{ media | external_video_tag }}
    {% else %}
      {{ media | media_tag }}
  {% endcase %}
{% endfor %}

Metafield filters

FilterWhat it doesReal use
metafield_tagPrints a metafield as ready-made HTML (lists, links, rich text, images)Show "Care instructions" (rich text) with formatting kept
metafield_textPrints a metafield as plain textUse a metafield inside an alt text or a short label
Product page
{{ product.metafields.custom.care_instructions | metafield_tag }}
{{ product.metafields.custom.fabric | metafield_text }}

Money filters

Prices in Liquid are in the smallest unit (paise). These filters turn them into readable prices in the store's format.

FilterOutput for 25000Real use
money₹250.00Normal prices everywhere
money_with_currency₹250.00 INRMulti-currency stores, cart totals, so there is no doubt
money_without_trailing_zeros₹250Clean prices on product cards and badges
money_without_currency250.00Inside text where you add the symbol yourself, or for scripts
Example
{{ product.price | money }}
{{ cart.total_price | money_with_currency }}

Payment filters

FilterWhat it doesReal use
payment_buttonShows "Buy it now" express buttons (Shop Pay, Google Pay…) in a product formFaster checkout from the product page
payment_termsShows "Pay in instalments" info (like Shop Pay Installments)Under the price, or in the cart. Horizon uses it in the cart summary
payment_type_svg_tagLogo of a payment method (Visa, UPI…)Payment icons in the footer
payment_type_img_urlImage URL of a payment logoSame, when you need an <img>
Footer payment icons
{% for type in shop.enabled_payment_types %}
  {{ type | payment_type_svg_tag: class: 'payment-icon' }}
{% endfor %}

String filters

The everyday text filters (append, capitalize, downcase, upcase, escape, newline_to_br, prepend, remove, replace, slice, split, strip, strip_html, truncate, url_encode…) are explained on the Liquid page. Here are the ones Shopify adds.

FilterWhat it doesReal useExample → output
handleizeTurns text into a handleBuild a CSS class or a link from a name{{ 'Masala Chai 500g!' | handleize }} → masala-chai-500g
camelcaseJoins words, each starting with a capitalRare; names for scripts{{ 'coming-soon' | camelcase }} → ComingSoon
pluralizePicks the right word for 1 or many"1 item" vs "3 items"{{ cart.item_count | pluralize: 'item', 'items' }}
url_escapeMakes text safe in a URL, but keeps &Building URLs{{ '<chai>' | url_escape }}
url_param_escapeLike url_escape, but also escapes &Text inside one URL parameter{{ 'Tea & Coffee' | url_param_escape }}
md5, sha1, sha256Turns text into a fixed "fingerprint" codeClassic: a Gravatar profile picture from an email (md5){{ customer.email | downcase | md5 }}
hmac_sha1, hmac_sha256A fingerprint made with a secret keySign data for a third-party widget that checks it{{ customer.id | hmac_sha256: 'key' }}
pluralize in the cart
{{ cart.item_count }} {{ cart.item_count | pluralize: 'item', 'items' }} in your cart
Output
3 items in your cart

Objects

Objects are the store data Liquid can read: the product, the cart, the customer, the settings. You print them with double curly braces, and read their details (called properties) with a dot: product.title, cart.item_count.

Some objects are available everywhere (like shop and cart). Others only on their page (like product on a product page, collection on a collection page). In a Horizon block, use closest.product and closest.collection to get the nearest one.

The most used objects

product

One product. Available on product pages, and in loops like for product in collection.products.

PropertyWhat it givesReal use
product.titleThe nameHeadings, cards
product.priceLowest price (in paise){{ product.price | money }}
product.compare_at_priceThe "was" priceSale badge, crossed-out price
product.availabletrue if any variant can be bought"Sold out" label
product.featured_image / product.images / product.mediaPhotos and mediaCards and galleries
product.variantsAll variants (sizes, colours)Variant picker
product.selected_or_first_available_variantThe variant to show by defaultPrice, stock, add to cart
product.options_with_valuesOptions like Size: S, M, LBuilding size and colour buttons
product.tags / product.type / product.vendorTags, type and brandBadges, "More from this brand"
product.descriptionThe description HTMLProduct page text
product.url / product.handleLink and handleLinks on cards
product.metafieldsYour custom fieldsFabric, care instructions, size chart

variant

One version of a product, like "Masala Chai / 500g".

PropertyReal use
variant.idThe ID to add to the cart
variant.price / variant.compare_at_pricePrice of this size
variant.availableCan this size be bought?
variant.inventory_quantity"Only 3 left"
variant.sku / variant.barcodeShow the SKU for wholesale buyers
variant.title / variant.options"500g" or ["500g", "Loose"]
variant.image / variant.featured_mediaPhoto for this variant
variant.weightWith weight_with_unit

collection

A group of products. Available on collection pages, or by handle: collections['teas'].

PropertyReal use
collection.title / collection.description / collection.imageCollection banner
collection.productsThe products to loop over (use paginate)
collection.products_count"24 products"
collection.filtersThe filter sidebar (colour, size, price)
collection.sort_options / collection.sort_byThe "Sort by" dropdown
collection.all_vendors / collection.all_types / collection.all_tagsLists for filter menus
collection.url / collection.handleLinks

cart

The shopper's cart. Available everywhere.

PropertyReal use
cart.item_countThe number on the cart icon
cart.itemsLoop over lines in the cart (each is a line_item)
cart.total_price / cart.items_subtotal_priceTotals
cart.total_discount"You saved ₹100"
cart.noteThe order note box
cart.attributesExtra info like "How did you hear about us?"
cart.currencyCurrent currency in multi-currency stores
cart.total_weightShipping notes

customer

The logged-in customer. Empty if nobody is logged in, so always check {% if customer %} first.

PropertyReal use
customer.first_name / customer.name / customer.email"Hi Saddam!" in the header
customer.orders / customer.orders_countOrder history on the account page
customer.tagsShow VIP or wholesale content
customer.addresses / customer.default_addressAddress book
customer.total_spentLoyalty messages
customer.has_accountInvite guests to create an account

shop

Your store's details. Available everywhere.

PropertyReal use
shop.nameFooter: "© 2026 Chai Corner"
shop.email / shop.phoneContact details on the contact page
shop.addressFooter address (with format_address)
shop.currency / shop.money_formatPrice formats
shop.enabled_payment_typesPayment icons
shop.policiesLinks to refund, privacy, shipping policies
shop.metafieldsStore-wide custom fields, like a free-delivery note

settings

The Theme settings the merchant chose in the theme editor (colours, fonts, logo, social links).

Real use: {{ settings.logo }}, settings.type_body_font, social links in the footer. The names come from config/settings_schema.json.

section and block

Inside a section file, section is that section; inside a block, block is that block.

PropertyReal use
section.settings.headingThe text the merchant typed in the editor
section.idUnique ID, to keep CSS separate per copy of the section
section.blocksLoop over the blocks the merchant added
block.settings / block.typeThe block's own settings and kind
block.shopify_attributesAdd it to the block's main HTML tag, so clicking it in the editor selects it
A section with blocks
{% for block in section.blocks %}
  <div {{ block.shopify_attributes }}>
    <h3>{{ block.settings.question }}</h3>
    <p>{{ block.settings.answer }}</p>
  </div>
{% endfor %}

request and routes

ObjectWhat it givesReal use
request.page_typeWhich kind of page this is: 'product', 'collection', 'index'…Load a script only on product pages
request.path / request.hostThe current addressHighlight the active menu link
request.localeThe current languageLanguage-specific content
request.design_modetrue inside the theme editorShow a helper message only to the merchant while editing
routes.cart_url, routes.account_url, routes.search_url…Correct links, even with language folders like /en-gb/Always use these instead of typing /cart
Example
<a href="{{ routes.cart_url }}">Cart ({{ cart.item_count }})</a>
{% if request.page_type == 'product' %}<script src="{{ 'product-extra.js' | asset_url }}" defer></script>{% endif %}

All objects, grouped

Every object in the cheat sheet, with what it is and where you use it.

Page and layout objects

ObjectWhat it isReal use
content_for_headerShopify's own scripts and tagsMust be in <head> of layout/theme.liquid. Apps and analytics break without it
content_for_layoutThe page contentMust be in the layout's <body>; it is where each page appears
content_for_indexHome page sections (old themes)Old .liquid home templates
content_for_additional_checkout_buttons / additional_checkout_buttonsExpress checkout buttons and "are there any?"Shop Pay / Google Pay buttons in the cart
page_title / page_description / page_imageThe SEO title, description and share image<title> and meta tags in the layout
canonical_urlThe main address of this page<link rel="canonical"> for SEO
templateThe template name and suffix, like product.bundleDifferent HTML for a special template
theme (old)The current themeRarely needed now
current_pageThe page number in a paginated list"Page 2" in the title
current_tagsTags the shopper filtered byShow the active tag filters
handleThe handle of the current page's resourcePage-specific CSS classes
powered_by_linkThe "Powered by Shopify" linkFooter
request, routesSee abovePage type, correct links

Store-wide objects

ObjectWhat it isReal use
shopStore detailsName, contact, policies
settingsTheme settingsLogo, colours, fonts
brandBrand assets from Settings → Brand (logo, colours, slogan)Use the official logo and colours
brand_colorOne brand colourAccents that follow the brand settings
localizationAvailable countries and languages, and the current onesCountry and language picker
country / currency / shop_localeOne country, currency or languageShow "Shipping to India (INR)"
all_country_option_tags / country_option_tagsReady-made <option> lists of countriesCountry dropdown in address forms
policyOne store policyRefund policy page link
dateA date valueUse with the date filter
appAn app's data, in app blocksapp.metafields for app settings

Product objects

ObjectWhat it isReal use
product, variantSee aboveProduct pages and cards
product_optionOne option, like SizeBuilding size buttons
imageOne imageimage_url, alt text
imagesAll images in the store, by file nameRare; a fixed image from Files
mediaOne media item (image, video, 3D)Galleries
video / video_sourceAn uploaded video and its filesProduct videos
external_videoA YouTube or Vimeo videoHow-to videos
model / model_sourceA 3D model and its files3D product view
image_presentation / focal_pointHow an image is cropped and where its centre of interest isKeep faces in view when images are cropped
generic_fileA file (like a PDF) from a metafieldDownloadable manuals
measurement / unit_price_measurementWeights and "price per 100g"Unit prices for groceries
quantity_ruleMinimum, maximum and step for B2B quantities"Buy in packs of 6"
ratingA rating value (from a metafield)Stars on product cards
recommendationsRelated products from Shopify"You may also like"
store_availability / locationStock at physical stores"Pick up today at MG Road store"
selling_plan_group, selling_plan, selling_plan_option, selling_plan_allocation, price adjustment and checkout charge objectsSubscriptions and pre-orders"Subscribe and save 10%" options
all_productsGet a product by handleOne fixed product; max 20 per page, so do not overuse

Collection, search and navigation objects

ObjectWhat it isReal use
collection, collectionsOne collection / all by handleCollection pages, featured rows
filter / filter_valueOne filter and its optionsFilter sidebar with counts
sort_optionOne "Sort by" choiceSort dropdown
paginate / partPagination info and each page linkCustom "1 2 3" buttons
searchSearch results and termsSearch page
predictive_search / predictive_search_resourcesSuggestions while typingSearch drop-down
linklists / linklist / linkMenus and their linksHeader and footer menus: linklists['main-menu'].links
forloop / tablerowLoop informationFirst/last item in a loop

Cart, checkout and order objects

ObjectWhat it isReal use
cartSee aboveCart page and drawer
line_itemOne line in the cart or an orderTitle, quantity, price, properties like engraving
discount_application / discount_allocationWhich discount applied and how much went to each line"Diwali 10% off: -₹50" in the cart
discount (old)Old discount objectUse discount_application
shipping_method / tax_lineShipping and tax detailsOrder pages and notifications
orderOne orderCustomer order history, order status page
fulfillmentA shipment, with tracking"Track your parcel" link
transaction / transaction_payment_detailsPayment details of an orderOrder details in emails
gift_card / recipientA gift card and who receives itGift card page, "send to a friend"
pending_payment_instruction_inputInstructions for payments that finish later (like bank transfer)Order status and emails
moneyA money value with currencyPrices from metafields
checkout (old)The old checkoutWas for checkout.liquid. Checkout is now customized with checkout extensions

Customer and B2B objects

ObjectWhat it isReal use
customerThe logged-in customerAccount pages, VIP content
address / customer_addressAn addressAddress book, footer address
company / company_location / company_addressB2B company, its branch and addressShow the business name and branch for wholesale buyers
form / form_errorsThe current form and its errors"Thanks for your message", error messages

Content objects

ObjectWhat it isReal use
page / pagesA content page / all pages by handleAbout us, FAQ pages
blog / blogsA blog / all blogs by handleBlog list pages
article / articlesA blog post / posts by handleBlog post pages, "latest posts" on the home page
commentA comment on a postComment lists
userThe staff member who wrote a post"Written by Saddam"
metafieldOne custom fieldFabric, size chart, care steps
metaobject / metaobject_definition / metaobject_systemYour own content types (like "Store location" or "FAQ"), their setup and system infoStore locator, FAQ library, lookbooks

Theme building objects

ObjectWhat it isReal use
section / blockSee aboveEvery section and block
settingsTheme settingsGlobal choices
color (with red, green, blue, alpha, hue, saturation, lightness)A colour setting and its partsMake see-through versions of a colour
color_scheme / color_scheme_groupHorizon's colour schemesEach section picks a scheme
fontA font settingWith font_face and font_modify
script / scripts (old)Shopify Scripts (Plus)Replaced by Shopify Functions

robots.txt objects

robots, group, rule, sitemap and user_agent are only used in the templates/robots.txt.liquid file, which tells Google which pages to skip.

Real use: block search engines from crawling a private or duplicate area of the store. When: rarely, and carefully; a mistake here can hide the whole store from Google.

Quick recap

  • Handles are web-friendly names: masala-chai-500g. Use them to fetch one fixed collection, page or menu.
  • Tags Shopify adds: form (all store forms), style (CSS from settings, live in the editor), paginate (long lists), layout, render, sections, javascript, stylesheet.
  • Filters Shopify adds: money, images and media, fonts, colours, links, translations (t), metafields, payments.
  • Objects are the store data: product, variant, collection, cart, customer, shop, settings, section, block, request, routes, and many more.
  • Old items: use image_url (not img_url), render (not include), the localization form (not currency_selector), checkout extensions (not checkout.liquid).

Try it yourself

On the product page, add a Custom Liquid block inside Product information that shows:

By Chai Corner · Tea · ₹250 · 2 already in your cart

The brand and type must be links, the price must use the store's money format without trailing zeros, and the last part shows only if this variant is already in the cart.

Hints: link_to_vendor, link_to_type, money_without_trailing_zeros, item_count_for_variant. In a block, use closest.product.

Show solution
Custom Liquid block
{%- liquid
  assign p = closest.product
  assign v = p.selected_or_first_available_variant
  assign in_cart = cart | item_count_for_variant: v.id
-%}
<p>
  By {{ p.vendor | link_to_vendor }} · {{ p.type | link_to_type }} · {{ v.price | money_without_trailing_zeros }}
  {%- if in_cart > 0 %} · {{ in_cart }} already in your cart{% endif %}
</p>
Check: The brand and type are clickable, the price has no ".00", and after adding the product to the cart and reloading, "already in your cart" appears.

Learn the core language first? Read Liquid explained simply. Want to practise on your own store with me? Join a live class.