Re: Using Freemarker to generate Freemarker?
Daniel Dekany <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Use square-bracket syntax for the first pass: http://freemarker.org/docs/dgui_misc_alternativesyntax.html Then it's obvious which tags has to be resolved in the 1st, and which in the 2nd pass. Otherwise it's quite messy to find it out, even if FM would ignore calling undefined directives. Friday, May 14, 2010, 11:07:06 PM, gz1 wrote: > > Hello, > > What's the best way to use Freemarker to generate Freemarker? Ideally I'd > like to processes a template and substitute the tags that it finds bindings > for. If no binding is found for a tag/expression I'd want it to just render > the tag as-is. Right now Freemarker tosses its exception cookies if an > expression is undefined because there is no binding for it. > > I'm wanting to pre-process a Freemarker template and substitute some tags, > but not all. After this initial pre-processing the resultant output (also a > Freemarker template) is processed again by another object to replace the > remaining expression tags. > > Any ideas? Thanks! > Greg -- Best regards, Daniel Dekany ------------------------------------------------------------------------------