OXID eShop CE  6.0.4
modifier.oxtruncate.php File Reference

Functions

 smarty_modifier_oxtruncate ($sString, $iLength=80, $sSufix='...', $blBreakWords=false, $middle=false)
 

Function Documentation

◆ smarty_modifier_oxtruncate()

smarty_modifier_oxtruncate (   $sString,
  $iLength = 80,
  $sSufix = '...',
  $blBreakWords = false,
  $middle = false 
)

Copyright © OXID eSales AG. All rights reserved. See LICENSE file for license details.This method replaces existing Smarty function for truncating strings (check Smarty documentation for details). When truncating strings additionally we need to convert '/" entities to '/" and after truncating convert them back.


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$sStringString to truncate
integer$iLengthTo length
string$sSufixTruncation mark
bool$blBreakWordsbreak words
bool$middlemiddle ?
Returns
string