instagram

Apache Velocity Part 5 – condition #if

Apache Velocity has if condition like all other programming language. Find below syntax of #if in velocity.

Single if statement.

#if

#end

If with ElseIf.

#if

#elseif

#end

Find below example template for more details.

condition.vm

Find below code sample.

Output :

Share