velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <>
Subject Re: How to load a macro from file (again!!!)
Date Tue, 06 Jan 2009 16:21:03 GMT
On Mon, Jan 5, 2009 at 4:15 PM, Jude Robinson
<> wrote:
>> Oh, and if you were using Velocity 1.6.1, then you could use #parse to
>> load your macros.
> <finally stops lurking/> Hello.
> Using #parse to load macros - that sounds interesting - can you give
> an example, and explain when/why that may be useful?

i don't think it's often useful; most of the time there's another,
better way.  but there are those who have needed it.  not having been
one myself, i don't have a great example.  but here's a made up one:

#macro(  link $page )$page#end
#macro(  blah $x )Do y with $x here#end

#macro( link $page )$page#end
#macro( blah $x )Do z with $x here#end

#if( $ )
#parse( 'foo.vm' )
#parse( 'bar.vm' )
Hello $,
<a href="#link( 'home.html' )">#blah( 'your account' )</a>.
george of the jungle

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message