|
modifiers
Sugar
|
|
|||
|
|
PHP-Sugar trunk now supports modifiers, as found in Smarty or Django. Syntax is the same as you'd expect: uppercased $value: {% $value|upper %} pass uppercased $value as the var parameter to function: {% function var=$value|upper %} print the uppercased result of function: {% function|upper var=$value %} Modifiers can be chained and can take parameters using the :param syntax, e.g. {% $value|default:'string'|upper %} |
||