Created
May 13, 2014 08:32
-
-
Save 2dpi/a540527a64f9f0093392 to your computer and use it in GitHub Desktop.
JOOMLA: truncate text blocks over the specified character limit (ie. word trim)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/////////////////////////////////////////////////////////////////////////////////// | |
// ADD TEXT TO BE TRIMMED, SET TRIM LENGTH IN CHARACTERS, BREAK WORD, STRIP HTML // | |
// http://api.joomla.org/cms-3/classes/JHtmlString.html // | |
/////////////////////////////////////////////////////////////////////////////////// | |
echo JHTML::_('string.truncate', $text, $length, true, false ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment