Clayton Scott wrote:
> On Mon, May 11, 2009 at 2:20 PM, Mark Wormgoor <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>     <snip>
> 
>  
> 
> 
>     Is there any reason the folowing doesn't work?
>     [% a > 0 ? SET b=1 : SET b=0 %]
> 
>  
> I think the ternary operator only takes very simple expressions.
> 
> Try this instead:
> 
> [% SET b = a > 0 ? 1 : 0 %]
> 
> or drop the SET which isn't really necessary
> 
> [% b = a > 0 ? 1 : 0 %]

That works indeed. Not exactly a logical sequence, but it does what I 
need :)

Thanks!

Mark


_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to