|
Re: html macro library: msg#00199jakarta.velocity.user
Friday, May 30, 2003, 8:41:00 PM, Kevin Bolton wrote: > Yes - but then I'd need to pass all of the args for directiveB through > the call of directiveA, wouldn't I? > > For example... > > #(directiveA $argForA) > $argForA > #end > > #(directiveB $argForB) > $argForB > #end > > If directiveA calls directiveB, Wouldn't I need to redefine directiveA > to be > #(directiveA $argForA $argForB) > $argForA > #directiveB ($argForB) > #end > ? Brrrr... what? :) No... So, assume I want create macro "border" (just for the sake of example). You would *use* it as (if we would not have the problem with the VTL syntax): #border(color="red") This is the any VTL. Even directives... anything. #end and you would *define* the border macro as, say: #macro( border $color ) <table border=1 color="$color"><tr><td> #body </tabe> #end So the output of the example macro call would be: <table border=1 color="$color"><tr><td> This is the any VTL. Even directives... anything. </tabe> It most probably can be implemented by the Vel. core developers. Except that #border(color="red") should somehow indicate that it has an end #end /-:. Maybe: #begin border(color="red") ... #end )-| ... I'm stuck with VTL syntax, it seems... :) -- Best regards, Daniel Dekany |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: html macro library: 00199, Kevin Bolton |
|---|---|
| Next by Date: | Re: html macro library: 00199, Bill Burton |
| Previous by Thread: | RE: html macro libraryi: 00199, Kevin Bolton |
| Next by Thread: | Re: html macro library: 00199, Daniel Dekany |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |