Smarty has support for the ternary operator since 2009/2010. But it was never documented. Also, it requires the testing expression to be in parentheses. So this works now:
{($foo) ? $var1 : $var2}
But this will not:
{$foo ? $var1 : $var2}
There is no support for the shorthand ?: version.
[ ] Change the implementation to make the parentheses optional
Smarty has support for the ternary operator since 2009/2010. But it was never documented. Also, it requires the testing expression to be in parentheses. So this works now:
But this will not:
There is no support for the shorthand
?:
version.