Modifiers Overview

Top  Previous  Next

Modifiers used in order to perform certain transformations with user input prior inserting result into template or generating output.

Variable modifiers can be applied to any variable in a template tag. To apply a modifier, specify the value followed by the | (pipe) and the modifier name. A modifier may accept additional parameters that affect its behaviour. These parameters follow the modifier name and are separated by : (colon) and quoted by double-quotes.

Examples:

{#title|upper#}

{#title|truncate:40:"..."#}

{#title|lower#}

First example uppercases the value of title variable. Second truncates it to 40 characters and add … at the end of string and the third makes the title value lowercased.