velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Tetlaw <andrew_tet...@bvn.com.au>
Subject Re: Macros with large input on parameters
Date Fri, 16 May 2003 22:13:07 GMT
I submitted an implementation of a block definition directive called 
#define (strangely enough!) here:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19409

with it you could do this:

#define( $body )

## multi lines here
...

#end 

then use it in your template as '$body'

I don't know if it'll work in a Macro! I don't see why not, it's just a 
standard reference. I think I shall do some testing....

Cheers,
Andrew Tetlaw

Bligh Voller Nield
http://www.bvn.com.au
p: (07) 3251 5778
f: (07) 3852 2544

Jeremy Cowgar <jc@cowgar.com> wrote on 17/05/2003 03:24:43 AM:

> I am curious if it is possible to have macros with large input. I'll 
give a 
> simple example:
> 
> #macro (block $title $body)
> <table class="Block">
> <tr><td class="BlockTitle">$title</td></tr>
> <tr><td class="BlockContents">$body</td></tr>
> </table>
> #end
> 
> Easy macro, but here's an example use:
> 
> #block ("Recent News" "........")
> 
> In the $body parameter, I would like to be able to run #foreach ... 
#end's, 
> have tables inside of it, etc... The code to generate the presentation 
of 
> Recent News might be 50 lines long.
 


<font face="Arial, Helvetica, sans-serif" size="2">
<b>

Please Also Note
</b>This document, including attachments, is only intended for the addressees and may
contain privileged or confidential information. Unauthorised use, copying or distribution
of the document or any part of its contents, is prohibited. If you receive this Email in error
please notify us by return Email or telephone. We will reimburse you for any reasonable expenses
incurred in meeting this request.</font> 


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message