[Zope] <dtml-if>

Michel Pelletier michel@digicool.com
Wed, 15 Mar 2000 10:14:00 -0800


Alessandra Pessolano wrote:
> 
> I have some problems with <dtml-if> comand.
> It's possible to insert the following expression:
> <dtml-if "OUTPUT == 'PROENG' and 'MATRIX'">
>   OK
> </dtml-if>
> Is it right?

Well, it's syntactically correct.  Whether or not it does what you want
it to do we can't tell because you didn't say what you want to do.

The expression "'PROENG' and 'MATRIX'"  will _allways_ return 'MATRIX'. 
So 'OK' will only be rendered if OUTPUT == 'MATRIX'.  In fact, this:

<dtml-if "OUTPUT == 'MATRIX'">
  OK
<dtml-if>

does exactly the same things as your code.

-Michel