Allow configurable of shared variables for FreeMarker
-----------------------------------------------------

                 Key: MAGNOLIA-3087
                 URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-3087
             Project: Magnolia
          Issue Type: Sub-task
          Components: freemarker
            Reporter: Grégory Joseph
            Assignee: Grégory Joseph
             Fix For: 4.3


Shared variables in Freemarker are a recommended way to have objects available 
to templates which do not change over the life time of the Freemarker 
configuration object. In the case of Magnolia, the configuration object is 
bound to Freemarker - which currently is a "permanent" singleton; it could 
eventually become an observed one. In any case, adding shared variables is 
possible.

The advantage of shared variables vs "regular" variables added to the context 
for each render are:
* these variables are wrapped once and only once over the lifetime of the 
application
* they are also (obviously) added to a map only once, thus slightly reducing 
the complexity/time needed to build the context before rendering.

There are probably a few context variable which we could also move to shared 
variables.

ref: http://freemarker.org/docs/pgui_config_sharedvariables.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to