Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6.2, 1.7
-
None
-
None
Description
Inspired by VELOCITY-583 (BlockMacro support) I implemented the same functionality in a slightly different way.
The new syntax is:
#@yourMacroName($arg1 $arg2) any valid velocity AST here #end
so basically the syntax is exactly the same as for normal macros except you put that @ prefix to the macro name. That tells Velocity that there's a macro AST body that should be passed to the actual macro.
And in the macro you can refer to the passed body 0-N times. Like:
#macro(yourMacroName $foo $bar)
$bodyContent
#end
Attachments
Attachments
Issue Links
- relates to
-
VELOCITY-675 #@foo causes an NPE
- Closed