Hi Stéphane,

yes it is possible.  One has only to write the required wrapper classes.  
However there are no fixed rules for how that should be done.  The wrapper 
class interfaces are well defined, but the specifics of what the 'dot 
notation' in a freemarker template means is determined by these wrapper 
classes.

An example if you write ${actpage.name}  in a freemarker template, should this 
return the property 'name' of the content node, or return the node name?  Or 
if we use ${actpage.nodeName} what should that return?  All of these are 
possible depending on how you write the wrappers.

That said... I have written a  handfull classes (9 total) that I use with 
freemarker, which I could make available.  If you replace a .jsp file used in 
a template definition with an .ftl file and configure the FreemarkerServlet 
in your web.xml to use my ContentWrapper it 'just works'.  No additional 
changes needed.

The only problem I had was that I didn't want to rewrite the cms edit bar 
tags.  But that isn't really a problem. You can use the existing jsp tags 
with freemarker templates when you have to.  There are only slight 
incompatibilities.

Perhaps through use we could improve them and reach conclusions about how they 
should work?

Cheers,
Chris

Am Freitag, 9. Februar 2007 10:19 schrieb Gauthier, Stephane (CH):
> Hi Magnolians,
>
> Could somebody tell me whether it's possible to get dynamically pageContext
> from a template page processed by freemarker and how to code it? Many
> thanks in advance.
>
> Cheers
>
> Stéphane Gauthier
>
> ***************************************************************************
>********* This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they are
> addressed. If you have received this email in error, please notify the
> system manager ([EMAIL PROTECTED]) and delete the message with any
> attached files from your system. The confidentiality and integrity of this
> message cannot be guaranteed on the Internet and the sender does not accept
> liability for its content.
>
> ***************************************************************************
>********
>
>
> ----------------------------------------------------------------
> for list details see
> http://www.magnolia.info/en/magnolia/developer.html
> ----------------------------------------------------------------

----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to