Presentation from dotCMS Boot Camp 2010. This covers simple solutions to common problems in Velocity. Learn basic velocity syntax and frequently used dotCMS view tools.
3. Velocity
ABC
• If
/
ElseIf
/
Else
statements
#if($condi5on_1)
Condi5on
1
was
met
#elseif($condi5on_2)
Condi5on
2
was
met
#else
Another
condi5on
was
met
#end
• AND
/
OR
#if($condi5on_1
&&
$condi5on_2)
…
#end
#if($condi5on_1
||
$condi5on_2)
…
#end