velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Tetlaw <>
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:

with it you could do this:

#define( $body )

## multi lines here


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....

Andrew Tetlaw

Bligh Voller Nield
p: (07) 3251 5778
f: (07) 3852 2544

Jeremy Cowgar <> 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 ... 
> have tables inside of it, etc... The code to generate the presentation 
> Recent News might be 50 lines long.

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

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:
For additional commands, e-mail:

View raw message