Make Freemarker more configurable through admininterface (MAGNOLIA-1469)

[MAGNOLIA-3087] Allow configuration of shared variables for FreeMarker Created: 16/Feb/10  Updated: 24/Jul/14  Resolved: 17/Feb/10

Status: Closed
Project: Magnolia
Component/s: freemarker
Affects Version/s: None
Fix Version/s: 4.3

Type: Sub-task Priority: Major
Reporter: Magnolia International Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
is causing MAGNOLIA-3190 Freemarker: incomplete configuration ... Closed
dependency
is depended upon by MAGNOLIA-2993 Extract logic out of taglibs - reusab... Closed
is depended upon by MAGNOLIA-3152 Move "mgnl" (MagnoliaTemplatingUtilit... Closed
is depended upon by MGNLSTK-609 Move "stk" (STKUtil) into FreeMarker ... Closed
relation
is related to MAGNOLIA-1469 Make Freemarker more configurable thr... Closed
is related to MGNLSTK-577 Make it configurable what classes are... Closed
is related to MAGNOLIA-5824 Reenable defining freemarker shared v... Closed
Template:

 Description   

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


Generated at Mon Feb 12 03:43:03 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.