Say I have a modifier that looks like this:
{$smarty.now|my_modifier:"param1"}
But imagine that my_modifier now expects two parameters and not just "param1"
. How would I pass those?
I want to do something like this:
{$smarty.now|my_modifier:"param1","param2"}
According to the documentation, you simply separate them with a colon ":"
Variable modifiers can be applied to variables, custom functions or strings. To apply a modifier, specify the value followed by a | (pipe) and the modifier name. 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. .
So I would assume
{$smarty.now|my_modifier:"param1":"param2"}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With