Will Scheidegger ha scritto:
Dear Magnolians
Can someone give me a quick primer on how to call java methods from a
Freemarker template?
As far as regards "model scope" method, I agree with what Jan and
Philipp suggested to you.
But I would like also to suggest another way.
We have introduced common utility methods, like getCurrentDate(), string
conversion, OS system operations...... and so on....
We extended the STK Template Renderer and we have created another mapped
instance, called "ctk" (e.g.: Custom Templating Kit).
In this way, we can use wherever we are (if the template is a ctk
template) the following scripts
${ctk.currentDate} // ${ctk.strConversion(aStr)} and so on.
It is a different approach, I know, but I think it is a interesting way
of doing.
HTH, Matteo
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------