3.1.3.2 Smarty Filter


Smarty Filter is used for (Example: til change a data variable text to UPPERCASE).

Below are some examples of Smarty Filter. It is possible to find more help on Smarty’s documentation.

 

Examples of Smarty’s filter

Filter can manipulate data in a variable. Filter can be written like {$variable|filter} (As Seen Below).

*CODE* *SNIPPIT*{$page.headline|upper}*CODE*

The output is:

A HEADLINE ON A PAGE

 

Examples of filter combinations

Filters can be combined (As Seen Below).

*CODE* *SNIPPIT*{$page.headline|upper|spacify}*CODE*

The output is:

A H E A D L I N E O N A P A G E