smarty_modifier_truncateHtml

Smarty truncateHtml modifier plugin

Type: modifier Name: truncateHtml Purpose: Truncate an HTML string to a certain number of words, while ensuring that valid markup is maintained. Example: <{$body|truncateHtml:30:'...'}>

Parameters
string $string

HTML to be truncated

#
integer $count = 80

truncate to $count words

#
string $etc = '…'

ellipsis

#
Returns
string