Template text formats and functions
Apply formats and functions to filter your parameter data, replace regular expressions. and apply simple rules to exclude or replace content.
Text in the Inspector
Select a content block in your template, then use the Text tab in the Inspector pane to choose a format and one or more functions to enhance your content block's results. Function options change based on the format selected.
Format options
Format |
Description |
---|---|
Plain text |
default option covering most text displays |
Text with HTML |
used with a content source to adjust any HTML in the source data so that it displays as normal text instead of UTF code in the template block |
Numeric |
allows defined formatting for numeric content |
Date |
allows defined formatting for date content |
Plain text and Text with HTML function options
Function |
Description |
---|---|
Prefix |
add a prefix to content |
Suffix |
add a suffix to content |
Truncate |
Cut off the word after a set number of characters with an ellipsis (...) |
Truncate nearest |
Cut off the sentence to the nearest word, after a set number of characters with an ellipsis (...) |
Replace |
Replace set words within the parameter data |
Replace if empty |
Replace if there is no data for a parameter |
Replace if shorter |
Replace if the parameter is shorter than x number of characters |
Replace if longer |
Replace if the parameter is longer than x number of characters |
Regular expression |
Replace repeated text by defining a sequence of characters to replace (e.g., a brand name that appears in all product titles can be replaced with a regular expression) |
Remove emojis |
Clears emojis from content |
Remove links |
Clears links from content and leaves text |
Get char at pos |
Select a character position in the parameter data to display that character, e.g., first letter in first and last name to display initials |
Reverse string |
Reverses the characters that appear in the content block |
Current time |
Display in the correct time zone and format |
Numeric and Date function options
Function |
Description |
---|---|
Input |
define the input format that the content contains |
Output |
define display of numeric or date content in specific formats - multiple options for both numeric and date to customize for design and audience |