Documentation Index
Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt
Use this file to discover all available pages before exploring further.
Aqua Filters
Filters modify the output of objects and variables. Chain multiple filters with the pipe | character.
{{ product.title | upcase | truncate: 20 }}
Money Filters
Format prices according to store currency settings.
Important: Prices in LaunchMyStore are stored as decimals (e.g., 19.99), not cents. No division by 100 needed.
money
Formats a number as currency using the store’s money_format.
{{ product.price | money }}
| Input | Output |
|---|
19.99 | $19.99 |
1234.50 | $1,234.50 |
money_with_currency
Includes the currency code.
{{ product.price | money_with_currency }}
| Input | Output |
|---|
19.99 | $19.99 USD |
money_without_currency
Formats without the currency symbol.
{{ product.price | money_without_currency }}
money_without_trailing_zeros
Removes .00 from whole numbers.
{{ 20.00 | money_without_trailing_zeros }}
{{ 19.99 | money_without_trailing_zeros }}
| Input | Output |
|---|
20.00 | $20 |
19.99 | $19.99 |
Asset Filters
Generate URLs for theme assets.
asset_url
Returns the URL for an asset in the theme’s assets/ folder.
{{ 'styles.css' | asset_url }}
{{ 'logo.png' | asset_url }}
Output: https://cdn.launchmystore.io/themes/{id}/assets/styles.css
asset_img_url
Returns sized image URL for an asset.
{{ 'logo.png' | asset_img_url: '200x' }}
{{ 'banner.jpg' | asset_img_url: 'master' }}
file_url
Returns URL for files uploaded to the theme.
{{ 'document.pdf' | file_url }}
stylesheet_tag
Generates a <link> tag for CSS.
{{ 'styles.css' | asset_url | stylesheet_tag }}
Output:
<link rel="stylesheet" href="https://cdn.../styles.css">
script_tag
Generates a <script> tag.
{{ 'app.js' | asset_url | script_tag }}
Output:
<script src="https://cdn.../app.js"></script>
preload_tag
Generates a preload link.
{{ 'critical.css' | asset_url | preload_tag: as: 'style' }}
Image Filters
Work with product, collection, and other images.
img_url / image_url
Returns a resized image URL.
{{ product.featured_image | img_url: '400x400' }}
{{ product.featured_image | img_url: '200x' }}
{{ product.featured_image | img_url: 'x300' }}
{{ product.featured_image | img_url: 'master' }}
Size formats:
400x400 - Exact dimensions
400x - Width only, proportional height
x400 - Height only, proportional width
master - Original size
small, medium, large - Preset sizes
img_tag / image_tag
Generates an <img> tag with optional attributes.
{{ product.featured_image | img_tag }}
{{ product.featured_image | img_tag: alt: product.title, class: 'product-image' }}
Output:
<img src="..." alt="Product Title" class="product-image">
Renders appropriate tag for any media type (image, video, 3D model).
{{ product.media[0] | media_tag }}
String Filters
upcase
Output: HELLO
downcase
Output: hello
capitalize
Capitalizes the first character.
{{ 'hello world' | capitalize }}
Output: Hello world
truncate
Truncates to a character limit with ellipsis.
{{ 'This is a long description' | truncate: 15 }}
{{ 'This is a long description' | truncate: 15, '...' }}
Output: This is a lo...
truncatewords
Truncates to a word limit.
{{ 'This is a very long description' | truncatewords: 3 }}
Output: This is a...
strip_html
Removes all HTML tags.
{{ '<p>Hello <strong>world</strong></p>' | strip_html }}
Output: Hello world
strip_newlines
Removes all newlines.
{{ product.description | strip_newlines }}
newline_to_br
Converts newlines to <br> tags.
{{ "Line 1\nLine 2" | newline_to_br }}
Output: Line 1<br>Line 2
replace
Replaces occurrences of a string.
{{ 'Hello World' | replace: 'World', 'Universe' }}
Output: Hello Universe
replace_first
Replaces the first occurrence only.
{{ 'Hello Hello' | replace_first: 'Hello', 'Hi' }}
Output: Hi Hello
remove
Removes all occurrences.
{{ 'Hello World' | remove: 'World' }}
Output: Hello
prepend
Adds text to the beginning.
{{ 'world' | prepend: 'Hello ' }}
Output: Hello world
append
Adds text to the end.
{{ 'Hello' | append: ' world' }}
Output: Hello world
split
Splits a string into an array.
{% assign tags = 'tag1,tag2,tag3' | split: ',' %}
{% for tag in tags %}{{ tag }}{% endfor %}
handleize
Converts to URL-safe handle.
{{ 'Summer Collection 2024!' | handleize }}
Output: summer-collection-2024
escape
HTML-escapes special characters.
{{ '<script>alert("hi")</script>' | escape }}
Output: <script>alert("hi")</script>
url_encode
URL-encodes a string.
{{ 'hello world' | url_encode }}
Output: hello%20world
url_decode
URL-decodes a string.
{{ 'hello%20world' | url_decode }}
Output: hello world
highlight
Wraps search terms in <mark> tags.
{{ product.title | highlight: search.terms }}
Math Filters
plus
Addition.
Output: 8
minus
Subtraction.
Output: 7
times
Multiplication.
Output: 15
divided_by
Division.
Output: 5
modulo
Remainder.
Output: 1
round
Rounds to decimal places.
Output: 3.14
ceil
Rounds up.
Output: 4
floor
Rounds down.
Output: 3
abs
Absolute value.
Output: 5
at_least
Returns the larger value.
Output: 5
at_most
Returns the smaller value.
Output: 5
Array Filters
first
Returns the first item.
{{ product.images | first }}
last
Returns the last item.
{{ product.images | last }}
size
Returns the array length.
join
Joins array elements.
{{ product.tags | join: ', ' }}
sort
Sorts an array.
{% assign sorted = collection.products | sort: 'price' %}
sort_natural
Case-insensitive sort.
{% assign sorted = collection.products | sort_natural: 'title' %}
reverse
Reverses an array.
{% assign reversed = collection.products | reverse %}
uniq
Removes duplicates.
{{ product.tags | uniq | join: ', ' }}
compact
Removes nil values.
{% assign clean = array | compact %}
map
Extracts a property from each item.
{{ product.variants | map: 'title' | join: ', ' }}
where
Filters by property value.
{% assign available = product.variants | where: 'available', true %}
find
Finds first matching item.
{% assign large = product.variants | find: 'title', 'Large' %}
reject
Removes matching items.
{% assign non_default = customer.addresses | reject: 'default', true %}
concat
Combines arrays.
{% assign all = array1 | concat: array2 %}
slice
Extracts a portion.
{{ 'hello' | slice: 0, 3 }}
{{ product.tags | slice: 0, 5 }}
Date Filters
date
Formats a date.
{{ article.published_at | date: '%B %d, %Y' }}
{{ 'now' | date: '%Y-%m-%d' }}
Format codes:
| Code | Output |
|---|
%Y | 2024 |
%m | 05 |
%d | 04 |
%B | May |
%b | May |
%A | Saturday |
%a | Sat |
%H | 14 (24-hour) |
%I | 02 (12-hour) |
%M | 30 |
%S | 45 |
%p | PM |
time_tag
Generates a <time> tag.
{{ article.published_at | time_tag }}
{{ article.published_at | time_tag: format: '%B %d' }}
Color Filters
color_to_rgb
Converts hex to RGB.
{{ '#ff0000' | color_to_rgb }}
Output: rgb(255, 0, 0)
color_to_hex
Converts to hex.
{{ 'rgb(255, 0, 0)' | color_to_hex }}
Output: #ff0000
color_lighten
Lightens a color.
{{ '#ff0000' | color_lighten: 20 }}
color_darken
Darkens a color.
{{ '#ff0000' | color_darken: 20 }}
color_brightness
Returns brightness (0-100).
{{ '#ff0000' | color_brightness }}
color_modify
Modifies color properties.
{{ settings.color_primary | color_modify: 'alpha', 0.5 }}
Font Filters
font_face
Generates CSS @font-face rules.
{{ settings.type_body_font | font_face }}
font_url
Returns the font URL.
{{ settings.type_body_font | font_url }}
font_property
Extracts a font property.
{{ settings.type_body_font | font_property: 'family' }}
{{ settings.type_body_font | font_property: 'weight' }}
{{ settings.type_body_font | font_property: 'style' }}
font_modify
Modifies font properties.
{{ settings.type_body_font | font_modify: 'weight', 'bold' }}
HTML Filters
link_to
Creates an anchor tag.
{{ 'Click here' | link_to: product.url }}
{{ 'Click here' | link_to: product.url, class: 'btn' }}
Output: <a href="/products/handle">Click here</a>
link_to_vendor
Links to vendor collection.
{{ product.vendor | link_to_vendor }}
link_to_type
Links to product type collection.
{{ product.type | link_to_type }}
link_to_tag
Links to tag filter.
{{ 'Summer' | link_to_tag: tag: 'summer' }}
Utility Filters
json
Converts to JSON.
<script>
var product = {{ product | json }};
</script>
parse_json
Parses a JSON string into an object.
{% assign data = '{"name": "Test", "price": 99}' | parse_json %}
{{ data.name }} - {{ data.price }}
Output: Test - 99
inline_asset_content
Inlines the content of an asset file (useful for SVGs).
{{ 'icon-cart.svg' | inline_asset_content }}
{{ 'logo.svg' | inline_asset_content }}
Output: The raw SVG markup inlined directly into the HTML.
Use this for SVG icons to avoid extra HTTP requests and enable CSS styling of SVG elements.
default
Returns default if value is nil/empty.
{{ product.metafields.custom.subtitle | default: 'No subtitle' }}
t (translate)
Translates a key from locales.
{{ 'products.add_to_cart' | t }}
{{ 'products.items_count' | t: count: 5 }}
placeholder_svg_tag
Generates a placeholder SVG.
{{ 'product-1' | placeholder_svg_tag }}
{{ 'collection-1' | placeholder_svg_tag: class: 'placeholder' }}
weight_with_unit
Formats weight with unit.
{{ variant.weight | weight_with_unit }}
Formats an address object.
{{ customer.default_address | format_address }}
structured_data
Generates JSON-LD for SEO.
{{ product | structured_data }}
Output: Complete Product schema JSON-LD
Payment Filters
payment_type_img_url
Returns payment method icon URL.
<img src="{{ 'visa' | payment_type_img_url }}" alt="Visa">
payment_type_svg_tag
Renders payment method SVG.
{{ 'visa' | payment_type_svg_tag }}
{{ 'mastercard' | payment_type_svg_tag: class: 'payment-icon' }}
Video Filters
external_video_url
Extracts embed URL from YouTube/Vimeo.
{{ 'https://youtube.com/watch?v=abc123' | external_video_url }}
external_video_tag
Renders an iframe for external video.
{{ 'https://youtube.com/watch?v=abc123' | external_video_tag }}
video_tag
Renders a <video> element.
{{ product.media[0] | video_tag: autoplay: false, controls: true }}
Access metafield values with type-aware output.
{{ product.metafields.custom.care_instructions }}
{{ product.metafields.custom.warranty_years | append: ' years' }}
For reference metafields (product, collection, etc.):
{% assign related = product.metafields.custom.related_products.value %}
{% for item in related %}
{{ item.title }}
{% endfor %}