DATA Methods

text()

Format output text and replace dynamic system placeholders, i.e. ##HREF#IDX##. For HTML field-types the system placeholders will be replaced automatically. For all other fields this function has to be called in template code in order to replace placeholders.

string text( string text [, int length = 0 [, int tolerance = 10 [, string end = "..." ]]])

Return

Formatted text.

Parameter
Description
textText to be formatted.
lengthMaximum text length to be returned. When passing zero the text will not be shortened.
toleranceAllow some tolerance when shortening text so that no words will be cut.
endPlace string at the end of shortened text.

Replace dynamic link-ref placeholder

$DATA->text('This is the <a href="##HREF#20##">LINK</a> to our login page!')
RETURN: 'This is the LINK to our login page!'

Shorten Text

$DATA->text("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.", 50)
RETURN: 'Lorem ipsum dolor sit amet, consetetur sadipscing ...'