In pure Java, I could do this:
value = (a > b) ? a : b;
Whereas in Velocity, the long form would be:
#if($a > $b) #set($value = $a) #else #set($value = $b) #end
Is there a short form in Velocity? I want to be able to do an if/otherwise inline.
You can do
#set($value = "#if($flag)red#{else}blue#end")
1.4m articles
1.4m replys
5 comments
57.0k users