The ternary operator is impelmented now. It can be used on assignments
and output.
Examples:
{$x=($y==2)?$foo:$bar}
{assign var=x value=($y==2)?$foo:$bar}
{($y==2)?$foo:$bar}
If you modifiers you have to put the expression into paranteses to
avoid ambiguity of the ':'.
{($y==2)?($foo|truncate):$bar}
The condition always needs to be in paranteses.
> > 2009/10/15 Matt <
m...@frigidmedia.com <mailto:
m...@frigidmedia.com>>
>
> > Thanks Karel. I wasn't aware of that particular plugin, which was a
> > wonderful solution to that problem. However, I am still curious as to
> > the status of the ternary operator in Smarty3, or any equivalent
> > simple conditional printing mechanism.
>
> > On Oct 13, 2:44 am, "Karel S." <
ka...@hardware.info