This component allows you to set a character limit for any string of text. You may also select the trailing behaviour. HTML mark-up is allowed. This will not truncate in the middle of a word, but will go back to the first space before the word.
<fm:Truncate string="A long string to be truncated" length="40" trailing="..." />
Name | Required | Default | Description |
---|---|---|---|
length | Required | N/A | The max length of the string |
strict | Optional | Set to true to truncate strictly on length, false to truncate on word breaks. | |
string | Required | N/A | The string you would like to truncate if larger then length |
trailing | Optional | ... | The characters you wish to use at the end of the text if larger then length |
This component defines no template variables.
<fm:Truncate string="{$media_message}" length="40" trailing="..." />