You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Velocity allows the template designer to easily use a large amount of uninterpreted and unparsed content in VTL code. This is especially useful if you want to avoid multiple directives or sections whose content would otherwise be invalid (and thus unparseable) VTL.

The syntax is as follows:

#[[ Unparsed Code ]]#

For example, the following code:

#[[ 
#foreach($c in $Class)
$c.name
#end
]]#

Will be rendered as:

#foreach($c in $Class)
$c.name
#end

The Unparsed Code support is available in HTML, XML, and text files only.