Smarty : plugins [ class tree: Smarty ] [ index: Smarty ] [ all elements ]

Procedural File: modifier.truncate.php

Source Location: /bblog/smarty_plugins/modifier.truncate.php ( Revision Log )

Page Details

Smarty plugin

Functions
smarty_modifier_truncate  [line 26]

string smarty_modifier_truncate( string $string, [integer $length = 80], [string $etc = '...'], [boolean $break_words = false], [boolean $middle = false]  )

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.

Parameters:
string   $string: 
integer   $length: 
string   $etc: 
boolean   $break_words: 
boolean   $middle: 

Information Tags:
Link:  truncate (Smarty online manual)

[ Top ]