Feed Filters
These filters are used for formatting and manipulating data in feeds, such as product or content feeds. They help with URL generation, currency formatting, string manipulation, and conditional logic. Use these filters to prepare data for export or integration with other platforms.
full_url
Completes relative urls to absolute URLs.
Input
{{ "/my/store/path" | full_url }}Output
https://www.mystore.com/my/store/pathlink
Creates a link to store resource.
Input
{{ product | link }}Output
https://www.mystore.com/product/my-productmoney
Rounds the given amount in currenct display currency.
Input
{{ 3.45234 | money }}Output
3.45money_in_decimal
Returns the given amount in decimal
Input
{{ 3.45234 | money_in_decimal: 2 }}Output
3.45money_in_smallest
Returns the given amount in the smallest currency unit.
Input
{{ 3.45234 | money_in_smallest }}Output
345money_with_currency
Returns the amount in current display currency rounded and formatted.
Input
{{ 3.45234 | money_with_currency }}Output
3.45 €number_in_decimal
Returns the given amount in decimals
Input
{{ 3.45234 | number_in_decimal: 2 }}Output
3.45safe_truncate
Removes HTML tags and truncates text without breaking HTML entities. This is safe for XML feeds as it ensures entities aren’t cut in the middle.
Input
{{ product.description | safe_truncate: 100, '...' }}Output
A safely truncated description...substr
Returns the portion of string specified by the offset and length parameters.
Input
{{ abcdef | substr: 0, 3}}Output
abcyepnope
Test if value is truthy and return the yes parameter value, otherwise return no value.
Input
{{ '' | yepnope: 'yes', 'no' }}
{{ 'some content' | yepnope: 'yes', 'no' }}Output
no
yes