[ 
https://issues.apache.org/jira/browse/VELOCITY-666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claude Brisson closed VELOCITY-666.
-----------------------------------

    Resolution: Fixed

Ok. Not saying that I'm convinced by the syntax, but looks like I've no 
alternative (except always sticking to #define to declare the block).


> Blockmacro support (allows any AST as macro body argument)
> ----------------------------------------------------------
>
>                 Key: VELOCITY-666
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-666
>             Project: Velocity
>          Issue Type: Improvement
>    Affects Versions: 1.6.2, 1.7
>            Reporter: Jarkko Viinamäki
>             Fix For: 1.7
>
>         Attachments: velocity-blockmacro.patch, velocity-call-directive.patch
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to