if var is string1, the first condition won't work because you have $!var == "string1" ==> if var is not string1 and url is not not "" (double negative on url)
Was this just a typo? -Seth "John Rodriguez" <[EMAIL PROTECTED] To: <velocity-user@jakarta.apache.org> du> cc: Subject: compound boolean statements 01/25/2005 02:21 PM Please respond to "Velocity Users List" How would I state the following correctly in Velocity? #if( $!var == "string1" && $!url != "" ) <a href="$url"><img src="image1"></a> #elseif( $!var == "Yes" && $!url != "" ) <a href="$url"><img src="image2"></a> #elseif( $!var == "No" && $!url != "" ) <a href="$url"><img src="image3"></a> #elseif( $!url != "" ) <a href="$url"><img src="image4"></a> #else <!-- nothing --> #end When I execute this code with var equal to "string1" and url not equal to "", I expect it to execute the 1st block. However, it executes the 4th block instead. Any ideas what I may be doing wrong? Thanks. ---------------------------------------- John Rodriguez New Media Associate Columbia Center for New Media Teaching and Learning (CCNMTL) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]