Categories > TinyButStrong general >

Parameter "when" has any OR / AND operators ?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Webys
Date: 2005-04-22
Time: 11:57

Parameter "when" has any OR / AND operators ?

I wish to hide an image link when  let's say check_var1==1 OR check_var2=2:

[onshow;block=a;when [var.check_var1;noerr]==1 OR check_var2==2]

So how I can use a single onshow parameter ???

Thanks.

-----
PS: It works with separated onshow parameters.

[onshow;block=a;when [var.check_var1;noerr]==1]
[onshow;block=a;when [var.check_var2;noerr]==2]

... but it's more template code and the code become unclear (html code) in future for meny checks.
By: Skrol29
Date: 2005-04-23
Time: 19:13

Re: Parameter "when" has any OR / AND operators ?

Hello Webys,

No operators are supported into the expression (AND, OR,...) . Only comparisons.
I've updated the FAQ for this point.

Nevertheless, you can perfome a AND by comparing conactenated strings.
But this won't help you for your OR.
Can't you an already prepared variable?