|
Re: html macro library: msg#00197jakarta.velocity.user
Nathan Bubna wrote: Kevin said: Nathan, I did not mean to imply that the above example does not work. What I meant was that if you write a macro library that largely wraps HTML functionality, you will want to be able to pass a block of template code to such a macro. IOW, in the general case, you will want for $text in: #html_href($link, $text) to be an arbitrary block, possibly containing invocations of other macros (for formatting purpose etc.) and so on. I watch this list off-and-on and I seem to recall this kind of thing coming up. I think that recently somebody even implemented a special #defineblock macro so that a block could be passed around as a parameter in such cases.
The ability to pass in a block (co-routine for language design buffs) as a parameter to an FTL macro was introduced in FreeMarker 2.2. See: http://freemarker.org/docs/dgui_misc_userdefdir.html This does make certain things possible that would be extremely tortuous to implement with Velocimacros -- or even outright impossible. Regards, Jonathan Revusky -- lead developer, FreeMarker project, http://freemarker.org/ FreeMarker-Velocity comparison page: http://freemarker.org/fmVsVel.html FreeMarker 2.3 pre1 is out!
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: security audit: 00197, Daniel Dekany |
|---|---|
| Next by Date: | RE: html macro library: 00197, Kevin Bolton |
| Previous by Thread: | Re: html macro libraryi: 00197, Nathan Bubna |
| Next by Thread: | Re: html macro library: 00197, Andrew Tetlaw |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |