Hi Adrian,
On Fri, Jun 3, 2011 at 6:12 AM, Adrian Crum < adrian.c...@sandglass-software.com> wrote: > I'm working on a project where screen widgets can't be used and I need to > use Freemarker templates instead. I would like to use the Freemarker macros > found in the widget macro library, but they are cumbersome to use because > they have MANY parameters - and almost all of them are set up as required > parameters. The markup the macros generate requires only a handful of the > parameters, and the rest of them are optional. So, I would like to work on > the macro library and provide default arguments for any parameters that > aren't required by the markup. Any thoughts or objections? > I reused form widget lookup macros in freemarker templates using similar approach. Just create a wrapper macro with default values and then call the widget macros. For an example check how htmlTemplate.lookupField macro is used and implemented in htmlTemplate.ftl HTH Bilgin Ibryam