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 create | Shopify makes the handle |
|---|---|
| A product called Masala Chai 500g | masala-chai-500g |
| A collection called Summer Sale! | summer-sale |
| A page called About Us | about-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:
{{ 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.
| Item | Real use in a store |
|---|---|
== != | Is the product type "Tea"? Is this the selected variant? |
> < >= <= | Is stock under 5? Is the cart over ₹999? |
and or | Product is on sale and in stock |
contains | Does the product have the tag "new"? Does the title contain "Gift"? |
| Strings | Titles, descriptions, settings text |
| Numbers | Prices (in paise), quantities, stock |
| Booleans | product.available, a checkbox setting |
| Nil | A metafield that was never filled |
| Arrays | collection.products, product.tags, cart.items |
| EmptyDrop | A handle that does not exist, like collections['wrong-name'] |
| Truthy / falsy | Only false and nil are "no". Use != blank to check a setting is really filled |
| Whitespace control | Add - (like {%-) to remove empty lines from the HTML |
Tags
Conditional tags (quick list)
| Tag | Real use in a store |
|---|---|
if | Show "Sold out" only when the product is not available |
elsif / else | Three stock messages: sold out, few left, in stock |
case / when | Different text per product type: Tea, Coffee, Accessories |
unless | Show 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.
{% 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.
{% 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)
| Tag | Real use in a store |
|---|---|
for | Show every product in a collection, every item in the cart |
else (in for) | "Your cart is empty" when there are no items |
break | Stop after you find the first sale product |
continue | Skip sold-out products in a "featured" row |
cycle | Alternate classes: left/right images, light/dark rows |
tablerow | A 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.
{% 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)
| Tag | Real use in a store |
|---|---|
comment | Leave a note: "Turned off for Diwali, bring back in January" |
echo | Print a value inside a liquid tag |
liquid | Write many lines of logic at the top of a block, cleanly |
raw | Show 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.
| Tag | What it is | Real use | When |
|---|---|---|---|
layout | Picks 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 feed | Only in .liquid templates. JSON templates set the layout with "layout": "…" |
render | Inserts a snippet | Product cards, icons, price, badges, used in many places | Whenever the same HTML appears more than once |
include (old) | Inserts a snippet, sharing all variables | Seen in old themes | Never in new code. Use render |
section | Puts one fixed section into a layout or template | {% section 'header' %} in old themes | Rare now. Section groups replaced it |
sections | Puts 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 footer | In the layout file |
javascript | JavaScript that belongs to one section or block | A small script for a slider in that section | Small, section-only scripts. For bigger scripts, use a file in assets |
stylesheet | CSS that belongs to one section or block | Horizon uses it in almost every block | Section or block CSS. It cannot use Liquid; use {% style %} for setting values |
{% for product in collection.products %}
{% render 'product-card', product: product, show_vendor: true %}
{% endfor %}Variable tags (quick list)
| Tag | Real use in a store |
|---|---|
assign | Save product.selected_or_first_available_variant as variant, so the code is shorter |
capture | Build a WhatsApp share text from the title and the shop name |
increment | Unique IDs for each FAQ accordion on the page |
decrement | Rare; counting down |
Details: Liquid page, variables.
Filters
Array filters (quick list)
| Filter | Real use in a store |
|---|---|
concat | Join two lists of products into one row |
join | Print tags as "organic, assam, bestseller" |
first / last | The first image, the newest tag |
[0] (index) | Pick one item by position: product.images[1] for the second photo |
map | All titles or all vendors from a list of products |
reverse | Newest first |
size | "3 items in your cart", "Showing 24 products" |
sort / sort_natural | Order products by price, or names A to Z |
uniq | Show each vendor only once |
where | Only 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.
{%- 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.
| Filter | What it does | Real use | Example |
|---|---|---|---|
link_to_type | Link to all products of a type | Clickable "Tea" label on a product | {{ product.type | link_to_type }} |
link_to_vendor | Link to all products of a brand | Clickable brand name under the title | {{ product.vendor | link_to_vendor }} |
url_for_type | Just the URL for a type | Your own styled button to "All teas" | {{ 'Tea' | url_for_type }} → /collections/types?q=Tea |
url_for_vendor | Just the URL for a brand | A "More from this brand" link | {{ product.vendor | url_for_vendor }} |
sort_by | Adds a sort order to a collection URL | "Price: low to high" links | {{ collection.url | sort_by: 'price-ascending' }} |
within | Makes a product link inside the collection | Breadcrumbs "Teas > Masala Chai", and next/previous product in that collection | {{ product.url | within: collection }} |
highlight_active_tag | Wraps the selected tag in a highlight | Show 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.
| Filter | What it does | Real use |
|---|---|---|
color_lighten / color_darken | Lighter or darker by a % | Hover colour of a button |
color_saturate / color_desaturate | More or less colourful | A soft, muted background |
color_modify | Change one part: red, green, blue, alpha (see-through)… | A 15% see-through overlay on a banner |
color_mix | Mix two colours | A tint between the brand colour and white |
color_to_rgb / color_to_hsl / color_to_hex | Change the colour format | When a CSS property or a script needs a certain format |
color_extract | Read one part, like the red value | Rare; custom calculations |
color_brightness | How bright a colour is (0 to 255) | Decide if text on it should be black or white |
color_contrast | Contrast between two colours | Check text is readable (aim for 4.5 or more) |
color_difference / brightness_difference | How different two colours are | Readability checks |
{{ '#7ab55c' | color_to_rgb }}
{{ '#7ab55c' | color_modify: 'alpha', 0.15 }}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):
{%- 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
| Filter | What it does | Real use |
|---|---|---|
customer_login_link | A link to the login page | "Log in" in the header |
customer_logout_link | A link that logs out | "Log out" on the account page |
customer_register_link | A link to create an account | "Create account" under the login form |
login_button | Shows the Shop login button (follow the store in the Shop app) | Let shoppers follow your store with one tap |
{% if customer %}
Hi {{ customer.first_name }} · {{ 'Log out' | customer_logout_link }}
{% else %}
{{ 'Log in' | customer_login_link }}
{% endif %}Default filters
| Filter | What it does | Real use |
|---|---|---|
default | A backup value when something is empty | "Our best sellers" if the heading setting is empty |
default_errors | Prints a form's errors as a ready-made list | Wrong password, invalid email, on any {% form %} |
default_pagination | Prints ready-made page links | "Previous 1 2 3 Next" inside {% paginate %} |
<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.
| Filter | What it does | Real use |
|---|---|---|
font_face | Writes the @font-face CSS for the chosen font | Load the font the merchant picked |
font_modify | Gets a bolder, lighter or italic version | Bold headings from the same font family |
font_url | The web address of the font file | Preload the main font for speed |
{%- 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
| Filter | What it does | Real use | Example |
|---|---|---|---|
date | Formats a date | "Published 17 July 2026", order dates, © year | {{ article.published_at | date: '%d %B %Y' }} |
json | Turns any value into JSON (data JavaScript can read) | Pass product data to a script safely | <script>const product = {{ product | json }};</script> |
weight_with_unit | Weight 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.
| Filter | What it does | Real use |
|---|---|---|
link_to | Makes an <a> link | Quick links in a menu or text |
highlight | Bolds the search words in a result | Search results: "chai masala" when someone searched "chai" |
placeholder_svg_tag | Shows a grey placeholder drawing | New sections that have no image yet, so the editor preview still looks right |
preload_tag | Tells the browser to download a file early | Preload the main font or hero image for speed |
script_tag | Makes a <script> tag | Load a JS file from assets |
stylesheet_tag | Makes a <link rel="stylesheet"> tag | Load a CSS file from assets |
time_tag | Makes a <time> tag with a formatted date | Blog dates, good for search engines |
{{ '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
| Filter | What it does | Real use |
|---|---|---|
asset_url | URL of a file in the theme's assets folder | Your custom.js, custom.css, icons |
file_url | URL 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 files | Old themes. Use image_url on image objects now |
global_asset_url | URL of a file Shopify hosts for all stores | Rare; old helper scripts |
shopify_asset_url | URL of a Shopify-provided asset | Rare; old helper scripts |
<script src="{{ 'custom.js' | asset_url }}" defer></script>
<a href="{{ 'size-chart.pdf' | file_url }}" target="_blank">Size chart (PDF)</a>Localization filters
| Filter | What it does | Real use |
|---|---|---|
t (translate) | Prints a text from the theme's language files | Every fixed word in a theme: "Add to cart", "Sold out" |
format_address | Prints an address in the right order for that country | Store address in the footer, customer address on the account page |
currency_selector (old) | Old currency dropdown | Use {% form 'localization' %} with the localization object now |
<button>{{ 'products.product.add_to_cart' | t }}</button>
{{ customer.default_address | format_address }}Math filters (quick list)
| Filter | Real use in a store |
|---|---|
plus / minus | Price plus gift-wrap charge; how much you save |
times / divided_by | Discount percentage: multiply by 100 before dividing |
modulo | A promo banner after every 4th product |
round / ceil / floor | Ratings (4.37 → 4.4), full stars, pages needed |
abs | Size of a difference, without the minus |
at_least / at_most | Quantity at least 1; "show at most 10 left" |
Details: Liquid page, number filters.
Media filters
| Filter | What it does | Real use |
|---|---|---|
image_url + image_tag | Resized image URL, then a full <img> tag | Every image in a modern theme |
img_url / img_tag (old) | The old way to do the same | Old themes only |
media_tag | Shows any product media (image, video, 3D) the right way | Product galleries with mixed media |
video_tag | A video player for a video you uploaded | Product videos, hero background videos |
external_video_url / external_video_tag | YouTube or Vimeo video, with options like autoplay | A YouTube how-to video on a product |
model_viewer_tag | A 3D model viewer you can spin | 3D view of furniture or shoes |
{% 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
| Filter | What it does | Real use |
|---|---|---|
metafield_tag | Prints a metafield as ready-made HTML (lists, links, rich text, images) | Show "Care instructions" (rich text) with formatting kept |
metafield_text | Prints a metafield as plain text | Use a metafield inside an alt text or a short label |
{{ 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.
| Filter | Output for 25000 | Real use |
|---|---|---|
money | ₹250.00 | Normal prices everywhere |
money_with_currency | ₹250.00 INR | Multi-currency stores, cart totals, so there is no doubt |
money_without_trailing_zeros | ₹250 | Clean prices on product cards and badges |
money_without_currency | 250.00 | Inside text where you add the symbol yourself, or for scripts |
{{ product.price | money }}
{{ cart.total_price | money_with_currency }}Payment filters
| Filter | What it does | Real use |
|---|---|---|
payment_button | Shows "Buy it now" express buttons (Shop Pay, Google Pay…) in a product form | Faster checkout from the product page |
payment_terms | Shows "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_tag | Logo of a payment method (Visa, UPI…) | Payment icons in the footer |
payment_type_img_url | Image URL of a payment logo | Same, when you need an <img> |
{% 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.
| Filter | What it does | Real use | Example → output |
|---|---|---|---|
handleize | Turns text into a handle | Build a CSS class or a link from a name | {{ 'Masala Chai 500g!' | handleize }} → masala-chai-500g |
camelcase | Joins words, each starting with a capital | Rare; names for scripts | {{ 'coming-soon' | camelcase }} → ComingSoon |
pluralize | Picks the right word for 1 or many | "1 item" vs "3 items" | {{ cart.item_count | pluralize: 'item', 'items' }} |
url_escape | Makes text safe in a URL, but keeps & | Building URLs | {{ '<chai>' | url_escape }} |
url_param_escape | Like url_escape, but also escapes & | Text inside one URL parameter | {{ 'Tea & Coffee' | url_param_escape }} |
md5, sha1, sha256 | Turns text into a fixed "fingerprint" code | Classic: a Gravatar profile picture from an email (md5) | {{ customer.email | downcase | md5 }} |
hmac_sha1, hmac_sha256 | A fingerprint made with a secret key | Sign data for a third-party widget that checks it | {{ customer.id | hmac_sha256: 'key' }} |
{{ cart.item_count }} {{ cart.item_count | pluralize: 'item', 'items' }} in your cart3 items in your cartObjects
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.
| Property | What it gives | Real use |
|---|---|---|
product.title | The name | Headings, cards |
product.price | Lowest price (in paise) | {{ product.price | money }} |
product.compare_at_price | The "was" price | Sale badge, crossed-out price |
product.available | true if any variant can be bought | "Sold out" label |
product.featured_image / product.images / product.media | Photos and media | Cards and galleries |
product.variants | All variants (sizes, colours) | Variant picker |
product.selected_or_first_available_variant | The variant to show by default | Price, stock, add to cart |
product.options_with_values | Options like Size: S, M, L | Building size and colour buttons |
product.tags / product.type / product.vendor | Tags, type and brand | Badges, "More from this brand" |
product.description | The description HTML | Product page text |
product.url / product.handle | Link and handle | Links on cards |
product.metafields | Your custom fields | Fabric, care instructions, size chart |
variant
One version of a product, like "Masala Chai / 500g".
| Property | Real use |
|---|---|
variant.id | The ID to add to the cart |
variant.price / variant.compare_at_price | Price of this size |
variant.available | Can this size be bought? |
variant.inventory_quantity | "Only 3 left" |
variant.sku / variant.barcode | Show the SKU for wholesale buyers |
variant.title / variant.options | "500g" or ["500g", "Loose"] |
variant.image / variant.featured_media | Photo for this variant |
variant.weight | With weight_with_unit |
collection
A group of products. Available on collection pages, or by handle: collections['teas'].
| Property | Real use |
|---|---|
collection.title / collection.description / collection.image | Collection banner |
collection.products | The products to loop over (use paginate) |
collection.products_count | "24 products" |
collection.filters | The filter sidebar (colour, size, price) |
collection.sort_options / collection.sort_by | The "Sort by" dropdown |
collection.all_vendors / collection.all_types / collection.all_tags | Lists for filter menus |
collection.url / collection.handle | Links |
cart
The shopper's cart. Available everywhere.
| Property | Real use |
|---|---|
cart.item_count | The number on the cart icon |
cart.items | Loop over lines in the cart (each is a line_item) |
cart.total_price / cart.items_subtotal_price | Totals |
cart.total_discount | "You saved ₹100" |
cart.note | The order note box |
cart.attributes | Extra info like "How did you hear about us?" |
cart.currency | Current currency in multi-currency stores |
cart.total_weight | Shipping notes |
customer
The logged-in customer. Empty if nobody is logged in, so always check {% if customer %} first.
| Property | Real use |
|---|---|
customer.first_name / customer.name / customer.email | "Hi Saddam!" in the header |
customer.orders / customer.orders_count | Order history on the account page |
customer.tags | Show VIP or wholesale content |
customer.addresses / customer.default_address | Address book |
customer.total_spent | Loyalty messages |
customer.has_account | Invite guests to create an account |
shop
Your store's details. Available everywhere.
| Property | Real use |
|---|---|
shop.name | Footer: "© 2026 Chai Corner" |
shop.email / shop.phone | Contact details on the contact page |
shop.address | Footer address (with format_address) |
shop.currency / shop.money_format | Price formats |
shop.enabled_payment_types | Payment icons |
shop.policies | Links to refund, privacy, shipping policies |
shop.metafields | Store-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.
| Property | Real use |
|---|---|
section.settings.heading | The text the merchant typed in the editor |
section.id | Unique ID, to keep CSS separate per copy of the section |
section.blocks | Loop over the blocks the merchant added |
block.settings / block.type | The block's own settings and kind |
block.shopify_attributes | Add it to the block's main HTML tag, so clicking it in the editor selects it |
{% for block in section.blocks %}
<div {{ block.shopify_attributes }}>
<h3>{{ block.settings.question }}</h3>
<p>{{ block.settings.answer }}</p>
</div>
{% endfor %}request and routes
| Object | What it gives | Real use |
|---|---|---|
request.page_type | Which kind of page this is: 'product', 'collection', 'index'… | Load a script only on product pages |
request.path / request.host | The current address | Highlight the active menu link |
request.locale | The current language | Language-specific content |
request.design_mode | true inside the theme editor | Show 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 |
<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
| Object | What it is | Real use |
|---|---|---|
content_for_header | Shopify's own scripts and tags | Must be in <head> of layout/theme.liquid. Apps and analytics break without it |
content_for_layout | The page content | Must be in the layout's <body>; it is where each page appears |
content_for_index | Home page sections (old themes) | Old .liquid home templates |
content_for_additional_checkout_buttons / additional_checkout_buttons | Express checkout buttons and "are there any?" | Shop Pay / Google Pay buttons in the cart |
page_title / page_description / page_image | The SEO title, description and share image | <title> and meta tags in the layout |
canonical_url | The main address of this page | <link rel="canonical"> for SEO |
template | The template name and suffix, like product.bundle | Different HTML for a special template |
theme (old) | The current theme | Rarely needed now |
current_page | The page number in a paginated list | "Page 2" in the title |
current_tags | Tags the shopper filtered by | Show the active tag filters |
handle | The handle of the current page's resource | Page-specific CSS classes |
powered_by_link | The "Powered by Shopify" link | Footer |
request, routes | See above | Page type, correct links |
Store-wide objects
| Object | What it is | Real use |
|---|---|---|
shop | Store details | Name, contact, policies |
settings | Theme settings | Logo, colours, fonts |
brand | Brand assets from Settings → Brand (logo, colours, slogan) | Use the official logo and colours |
brand_color | One brand colour | Accents that follow the brand settings |
localization | Available countries and languages, and the current ones | Country and language picker |
country / currency / shop_locale | One country, currency or language | Show "Shipping to India (INR)" |
all_country_option_tags / country_option_tags | Ready-made <option> lists of countries | Country dropdown in address forms |
policy | One store policy | Refund policy page link |
date | A date value | Use with the date filter |
app | An app's data, in app blocks | app.metafields for app settings |
Product objects
| Object | What it is | Real use |
|---|---|---|
product, variant | See above | Product pages and cards |
product_option | One option, like Size | Building size buttons |
image | One image | image_url, alt text |
images | All images in the store, by file name | Rare; a fixed image from Files |
media | One media item (image, video, 3D) | Galleries |
video / video_source | An uploaded video and its files | Product videos |
external_video | A YouTube or Vimeo video | How-to videos |
model / model_source | A 3D model and its files | 3D product view |
image_presentation / focal_point | How an image is cropped and where its centre of interest is | Keep faces in view when images are cropped |
generic_file | A file (like a PDF) from a metafield | Downloadable manuals |
measurement / unit_price_measurement | Weights and "price per 100g" | Unit prices for groceries |
quantity_rule | Minimum, maximum and step for B2B quantities | "Buy in packs of 6" |
rating | A rating value (from a metafield) | Stars on product cards |
recommendations | Related products from Shopify | "You may also like" |
store_availability / location | Stock 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 objects | Subscriptions and pre-orders | "Subscribe and save 10%" options |
all_products | Get a product by handle | One fixed product; max 20 per page, so do not overuse |
Collection, search and navigation objects
| Object | What it is | Real use |
|---|---|---|
collection, collections | One collection / all by handle | Collection pages, featured rows |
filter / filter_value | One filter and its options | Filter sidebar with counts |
sort_option | One "Sort by" choice | Sort dropdown |
paginate / part | Pagination info and each page link | Custom "1 2 3" buttons |
search | Search results and terms | Search page |
predictive_search / predictive_search_resources | Suggestions while typing | Search drop-down |
linklists / linklist / link | Menus and their links | Header and footer menus: linklists['main-menu'].links |
forloop / tablerow | Loop information | First/last item in a loop |
Cart, checkout and order objects
| Object | What it is | Real use |
|---|---|---|
cart | See above | Cart page and drawer |
line_item | One line in the cart or an order | Title, quantity, price, properties like engraving |
discount_application / discount_allocation | Which discount applied and how much went to each line | "Diwali 10% off: -₹50" in the cart |
discount (old) | Old discount object | Use discount_application |
shipping_method / tax_line | Shipping and tax details | Order pages and notifications |
order | One order | Customer order history, order status page |
fulfillment | A shipment, with tracking | "Track your parcel" link |
transaction / transaction_payment_details | Payment details of an order | Order details in emails |
gift_card / recipient | A gift card and who receives it | Gift card page, "send to a friend" |
pending_payment_instruction_input | Instructions for payments that finish later (like bank transfer) | Order status and emails |
money | A money value with currency | Prices from metafields |
checkout (old) | The old checkout | Was for checkout.liquid. Checkout is now customized with checkout extensions |
Customer and B2B objects
| Object | What it is | Real use |
|---|---|---|
customer | The logged-in customer | Account pages, VIP content |
address / customer_address | An address | Address book, footer address |
company / company_location / company_address | B2B company, its branch and address | Show the business name and branch for wholesale buyers |
form / form_errors | The current form and its errors | "Thanks for your message", error messages |
Content objects
| Object | What it is | Real use |
|---|---|---|
page / pages | A content page / all pages by handle | About us, FAQ pages |
blog / blogs | A blog / all blogs by handle | Blog list pages |
article / articles | A blog post / posts by handle | Blog post pages, "latest posts" on the home page |
comment | A comment on a post | Comment lists |
user | The staff member who wrote a post | "Written by Saddam" |
metafield | One custom field | Fabric, size chart, care steps |
metaobject / metaobject_definition / metaobject_system | Your own content types (like "Store location" or "FAQ"), their setup and system info | Store locator, FAQ library, lookbooks |
Theme building objects
| Object | What it is | Real use |
|---|---|---|
section / block | See above | Every section and block |
settings | Theme settings | Global choices |
color (with red, green, blue, alpha, hue, saturation, lightness) | A colour setting and its parts | Make see-through versions of a colour |
color_scheme / color_scheme_group | Horizon's colour schemes | Each section picks a scheme |
font | A font setting | With 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(notimg_url),render(notinclude), the localization form (notcurrency_selector), checkout extensions (notcheckout.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
{%- 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>Learn the core language first? Read Liquid explained simply. Want to practise on your own store with me? Join a live class.