If True

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:

Remember to use double equals == otherwise a velocity error will occur.

  1. #if($userName)  
  2.     Hello $userName  
  3. #end  
comments powered by Disqus