What is a Smarty Modifier?

chinmay.sahoo

New member
Smarty modifiers are custom functions that process the value of any variable to achieve something special that is not available otherwise. For example, if you wish to capitalize the variable, concatenate some variables, or to perform string replace operations, then modifiers are the best way to do it. You can apply modifiers to variables and custom functions. You can also pass parameters to variable modifiers. Modifiers are a special kind of Smarty plug-in.
 
A modifier may accept additional parameters that affect its behavior. These parameters follow the modifer name and are separated by a : (colon). Also, all php-functions can be used as modifiers implicitly (more below) and modifiers can be combined.
 
A modifier may accept additional parameters that affect its behavior. These parameters follow the modifer name and are separated by a : (colon). Also, all php-functions can be used as modifiers implicitly (more below) and modifiers can be combined.
 
A php smarty modifier is most often applied to variables, but can be applied to literal text or functions as well.
 
Back
Top