Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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:

Code Block
languagetext
#[[ Unparsed Code ]]#

For example, the following code:

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

Will be rendered as:

Code Block
languagetext
#foreach($c in $Class)
$c.name
#end


Info

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