Filters
Liquid Filters
Liquid Output Filters
Liquid filters modify Shopify data output like date or capitalize.
Understanding Liquid Filters
Liquid filters are powerful tools in Shopify that allow developers to manipulate and transform data within their templates. They are used to modify the output of variables, such as formatting dates or changing text case. Filters are applied using a pipe symbol |
followed by the filter name.
Commonly Used Liquid Filters
There are numerous filters available in Liquid, each serving a different purpose. Some of the most commonly used filters include:
- capitalize: Capitalizes the first letter of a string.
- upcase: Converts all characters in a string to uppercase.
- downcase: Converts all characters in a string to lowercase.
- date: Formats a date string.
- replace: Replaces occurrences of a substring with another.
Filters
- Previous
- Layout Tag
- Next
- String Filters