I never received an answer for the following inquiry, any help guys?

 

  _____  

From: John Rodriguez [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 25, 2005 2:21 PM
To: 'velocity-user@jakarta.apache.org'
Subject: compound boolean statements

 

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)

Reply via email to