truncate
Shortens a string to a number of characters.
The ellipsis (default “…”) counts towards the length.
Syntax
Section titled “Syntax”string | truncate: length, ellipsisParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
length (required) |
number | Maximum length. |
ellipsis |
string | Text added at the end (default “…”). |
Returns
Section titled “Returns”string
Example
Section titled “Example”{{ 'Hand-embroidered linen abaya' | truncate: 15 }} · {{ 'Hand-embroidered linen abaya' | truncate: 15, '…' }}Hand-embroid... · Hand-embroider…Related
Section titled “Related”Compatibility
Section titled “Compatibility”Shopify: Same as Shopify.
Since theme platform 1.0.
Was this page helpful?

