Guide
Shopify Liquid Cheat Sheet 2026
Shopify Filters (URLs, HTML, Money and More)
Shopify adds its own filters on top of standard Liquid. Items marked with an asterisk in older cheat sheets only work on tag-filtered collection or blog pages.
asset_url
Returns the CDN URL of a file in the theme's assets folder.
{{ 'theme.css' | asset_url | stylesheet_tag }}camelize
Converts a string to CamelCase.
{{ 'variant-title' | camelize }} → VariantTitlecapitalize
Capitalizes the first character of a string.
{{ 'summer sale' | capitalize }}default_pagination
Outputs ready-made pagination links. Use inside a paginate block.
{{ paginate | default_pagination: next: 'Next', previous: 'Prev' }}global_asset_url
LegacyReturns the URL of a Shopify-hosted global asset. Rarely needed in modern themes.
{{ 'lightbox.js' | global_asset_url | script_tag }}handleize (handle)
Converts a string into a handle.
{{ 'Summer Sale!' | handleize }} → summer-saleimg_tag → use image_tag
LegacyUse image_url with image_tag, which outputs responsive srcset, width and height attributes automatically.
{% comment %} Current {% endcomment %}
{{ product.featured_image | image_url: width: 800 | image_tag: loading: 'lazy' }}link_to
Wraps text in a link to a URL.
{{ 'Contact us' | link_to: '/pages/contact' }}link_to_vendor
Links a vendor name to its auto-generated vendor collection.
{{ product.vendor | link_to_vendor }}link_to_type
Links a product type to its auto-generated type collection.
{{ product.type | link_to_type }}link_to_tag*
On collection and blog pages, links to the current resource filtered by a tag.
{% for tag in collection.all_tags %}
{{ tag | link_to_tag: tag }}
{% endfor %}link_to_add_tag*
Links to the current page with a tag added to the active filters.
{{ tag | link_to_add_tag: tag }}link_to_remove_tag*
Links to the current page with a tag removed from the active filters.
{{ tag | link_to_remove_tag: tag }}highlight_active_tag*
Wraps a tag in <span class="active"> when it is currently applied.
{{ tag | highlight_active_tag | link_to_tag: tag }}money
Formats a price using the store's money format. Prices in Liquid are in cents (subunits), so always apply a money filter.
{{ product.price | money }} → $19.99money_with_currency
Formats a price with the currency code.
{{ product.price | money_with_currency }} → $19.99 USDmoney_without_currency
Formats a price as a number without a currency symbol.
{{ product.price | money_without_currency }} → 19.99pluralize
Picks the singular or plural word based on a number.
{{ cart.item_count }} {{ cart.item_count | pluralize: 'item', 'items' }}product_img_url → use image_url
LegacyDeprecated, along with img_url. Use image_url with a width or height parameter.
{{ product.featured_image | image_url: width: 600 }}sort_by
Adds a sort parameter to a collection URL.
{{ collection.url | sort_by: 'price-ascending' }}script_tag
Outputs a <script> tag. It is render-blocking, so for performance prefer a manual <script src="…" defer>.
<script src="{{ 'app.js' | asset_url }}" defer></script>stylesheet_tag
Outputs a <link rel="stylesheet"> tag for a URL.
{{ 'theme.css' | asset_url | stylesheet_tag }}url_for_type
Returns the URL of a product type's collection page.
{{ 'Shirts' | url_for_type }}url_for_vendor
Returns the URL of a vendor's collection page.
{{ 'Acme' | url_for_vendor }}weight_with_unit
Formats a weight (stored in grams) using the store's weight unit.
{{ variant.weight | weight_with_unit }}within
Scopes a product URL to a collection, producing /collections/…/products/…. These URLs duplicate the canonical product URL, so many SEO-focused themes avoid them.
{{ product.url | within: collection }}Shopify stores that convert, rank higher, scale and sell more.
Builds, SEO and CRO from a Shopify Plus partner team.
Monthly send · Unsubscribe any time · Privacy policy
Shopify experts
Let's talk ecommerce, Shopify & Shopify Plus solutions.
DROPSHIP HUBS helps ecommerce brands build, improve, and grow Shopify stores. We support new builds, migrations, ongoing development, SEO, and conversion optimisation.
Our team can help plan the right approach based on your store, goals, and current challenges.
Get in touch




