Function smarty_modifier_truncate
Smarty truncate modifier plugin
Type: modifier
Name: truncate
Purpose: Truncate a string to a certain length if necessary, optionally splitting in the middle of a word, and appending the $etc string or inserting $etc into the middle.
Package: Smarty\PluginsModifier
Author: Monte Ohrt
Link: truncate (Smarty online manual)
Located at plugins/smarty/smarty_source/plugins/modifier.truncate.php
Author: Monte Ohrt
Link: truncate (Smarty online manual)
Located at plugins/smarty/smarty_source/plugins/modifier.truncate.php
string |
$string |
input string |
integer |
$length = 80 |
length of truncated text |
string |
$etc = '...' |
end string |
boolean |
$break_words = false |
truncate at word boundary |
boolean |
$middle = false |
truncate in the middle of text |
string
|
truncated string |