BlockMacro directive is used to invoke Velocity macros with normal parameters and a macro body.
The macro can then refer to the passed body AST. This directive can be used as a "decorator". Body AST can contain any valid Velocity syntax. An example:
#set($foobar = "yeah!") #macro(strong $txt) <strong>$bodyContent</strong> $txt #end #@strong($foobar) <u>This text is underlined and bold</u> #end
Will print:
<strong><u>This text is underlined and bold<u></strong> yeah!
bodyContent reference name is configurable (see velocity.properties).
@author
Jarkko Viinamaki
@since 1.7
@version $Id$