Re: extend the Include or Environment classes

Attila Szegedi <[email protected]>
Newsgroups gmane.comp.web.freemarker.devel
Message-ID <[email protected]>
You should configure your Configuration object with a MultiTemplateLoader that composes two template loaders: one for usual directory, and another one for the common directory.

Attila.

On Jun 27, 2011, at 4:58 PM, Francis Mendoza wrote:

> Hi All,
> 
>    I'm working right now on shifting our templating engine from StringTemplate to Freemarker. One of the requirement
> was that if the .ftl file (an #include) cannot be found, it will look for it at the common directory. I've look at the API and 
> Freemarker codes but there seem to be no way for me to do this on the "includes". 
> 
>    I checked on the Environment.java and saw the rendering of the includes down there: getTemplateForInclusion. Its
> a public method alright but then the class is marked final so I can't extend it to solve my problem. Is there a possibility
> for this class to be marked as not final on the future releases? 
>    
> -- 
> Francis Mendoza
> 
> JET Team
> Flight Centre Technology
> Level 4, 545 Queen Street, BRISBANE, QLD 4000.
> Phone:  04231 53500
> email:  [email protected]
> 
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security 
> threats, fraudulent activity, and more. Splunk takes this data and makes 
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2_______________________________________________
> FreeMarker-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-devel

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2

_______________________________________________
FreeMarker-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel
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.