|
Re: html macro library: msg#00181jakarta.velocity.user
Kevin Bolton wrote: Has anyone developed a macro library for standard html items? For I don't know whether anybody has developed such a library for Velocity, but it seems to me that, unless the macros could be applied recursively, such a library would be of very limited use-value. Unfortunately, Velocimacros have design problems or limitations that prevent this. You see, to be generally useful, a block-oriented HTML generating macro would have to be able to take a block (containing potentially other template directives) as its parameter. That is your $text parameter in the above. FYI, at least one other template engine does afford this possibility. FreeMarker has had the ability to define macros with associated blocks since version 2.2. If the Velocity community does resume active development of the template engine, then the above kind of feature is probably well worth lobbying them for. Best Regards, Jonathan Revusky -- lead developer, FreeMarker project, http://freemarker.org/ FreeMarker vs. Velocity comparison page: http://freemarker.org/fmVsVel.html FreeMarker 2.3 preview 1 is out! :-)
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | HELP with Velocity Tools needed: 00181, Tom Bednarz |
|---|---|
| Next by Date: | Re: HELP with Velocity Tools needed: 00181, Nathan Bubna |
| Previous by Thread: | html macro libraryi: 00181, Kevin Bolton |
| Next by Thread: | RE: html macro library: 00181, Kevin Bolton |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |