#elseIf / #else

The #if directive in Velocity allows for text to be included when the web page is generated, on the conditional that the if statement is true. For example:

  1. #if( $value < 10 )  
  2.     Go North  
  3. #elseif( $value == 10 )  
  4.     Go East  
  5. #elseif( $value == 6 )  
  6.     Go South  
  7. #else  
  8.     Go West  
  9. #end  
comments powered by Disqus