String - isSet()

You can generally use the example directly above if its just for a variable. This is useful when you need to write HTML based on a variable. See example:.

  1. #if($UtilMethods.isSet($item.shortTitle))  
  2.       <li>${content.shortTitle}</li>  
  3. #else  
  4.       <li>${content.title}</li>  
  5. #end  
comments powered by Disqus