Learn

truncate

Truncate a variable.

Sample Usage

{{ content|truncate:100 }}

This will output the value of content truncated to 100 characters with an at the end.

Parameters

This modifier expects one parameter, the number of characters to truncate the variable’s value to.

This article was last updated on March 30th, 2016. Find an error? Please let us know!