TruncateWords method (text)
Truncates this text if it is longer than the specified number of words.
Syntax
text.TruncateWords(count) text.TruncateWords(count, suffix)
Truncates text if it is longer that count words in length. If the text is truncated the value of suffix is appended.
count: The number of words to truncate after.
suffix: The text value to append to the text if it is truncated.
The default value for suffix is '…' (ellipsis).
Example
{% Var text = 'The quick brown fox jumps over the lazy dog' %}
{{ text.TruncateWords(5) }}
The above example would output: The quick brown fox jumps…
.