Re: Omitting template markup characters

Kjeld <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Wow, meanwhile I looked into the custom TemplateLoader solution again and I
got it working now. 
I have created a MyTemplateLoader class which extends FileTemplateLoader.
MyTemplateLoader has one constructor which takes the custom baseDir I'd like
to set, it propogates that baseDir to the constructor of FileTemplateLoader. 
Next I override getReader, which calls super.getReader(...). I use this
reader to walk through the original template file, trim the whitespaces etc
and then I have getReader output the new content by using a new
StringReader(content).

This is at least far more elegant than the temp file solution.

Thanks for your help Daniel!
-- 
View this message in context: http://freemarker.624813.n4.nabble.com/Omitting-template-markup-characters-tp2065383p2068982.html
Sent from the freemarker-user mailing list archive at Nabble.com.

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.