DTML Basics (part 2) - Paring It Down (
Page 6 of 8 )
In certain situations, you
can reduce the amount of code in your DTML
Methods by using the "unless" conditional test, which looks like this:
<dtml-unless condition>
do this!
</dtml-unless>
In this case, the statements in the "unless" block are only executed if
the conditional statement evaluates to false. Consider the following
rewrite of an earlier example, which demonstrates:
<dtml-unless expr="name != 'neo'">
<font face="Arial" size="-1">
Welcome to the Matrix, Neo.
</font>
</dtml-unless>