Class Include

All Implemented Interfaces:
Cloneable, DirectiveConstants

public class Include extends InputBase

Pluggable directive that handles the #include() statement in VTL. This #include() can take multiple arguments of either StringLiteral or Reference.

Notes:

  1. The included source material must lie within a configured resource root: a name climbing above it is refused by the resource loaders. If you want to include content from elsewhere on your disk, add extra template roots, or use a link from somewhere under a template root to that content.
  2. By default, there is no output to the render stream in the event of a problem. You can override this behavior with two property values : include.output.errormsg.start include.output.errormsg.end If both are defined in velocity.properties, they will be used to in the render output to bracket the arg string that caused the problem. Ex. : if you are working in html then include.output.errormsg.start=<!-- #include error : include.output.errormsg.end= --> might be an excellent way to start...
  3. As noted above, #include() can take multiple arguments. Ex : #include('foo.vm' 'bar.vm' $foo) will include all three if valid to output without any special separator.
Version:
$Id$
Author:
Geir Magnusson Jr., Jason van Zyl, Kasper Nielsen