[
http://jira.magnolia-cms.com/browse/MAGNOLIA-1788?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gregory Joseph updated MAGNOLIA-1788:
-------------------------------------
Description:
AlertUtil's message is currently added to the freemarker context only in
FreemarkerUtil (contrary to other default values which are added by
FreemarkerHelper. Not sure how to handle this, for two reasons:
- "message" seems a too generic key name (ie it might "accidentally" be used by
the template for another purpose)
- we're having more and more "default values" added to the freemarker context,
and maybe they just all belong to the magnolia context, which is already
exposed to the template as "ctx".
The feature where we passed a template stream/reader to FreeMarker templates
inline also needs a review/cleanup. It is used by the mail module and we could
probably be using a TemplateLoader to achieve this. In fact, Freemarker
provides an abstract URLTemplateLoader, and it would be fairly trivial to
implement it so that it fetches a page from a given Magnolia instance pretty
much the same way the mail module does it at the moment.
was:
AlertUtil's message is currently added to the freemarker context only in
FreemarkerUtil (contrary to other default values which are added by
FreemarkerHelper. Not sure how to handle this, for two reasons:
- "message" seems a too generic key name (ie it might "accidentally" be used by
the template for another purpose)
- we're having more and more "default values" added to the freemarker context,
and maybe they just all belong to the magnolia context, which is already
exposed to the template as "ctx".
> Simplify / remove FreemarkerUtil, handling of AlertUtil/message in
> FreemarkerHelper and other improvements.
> -----------------------------------------------------------------------------------------------------------
>
> Key: MAGNOLIA-1788
> URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-1788
> Project: Magnolia
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.5 RC1
> Reporter: Gregory Joseph
> Assignee: Gregory Joseph
> Fix For: 4.1
>
>
> AlertUtil's message is currently added to the freemarker context only in
> FreemarkerUtil (contrary to other default values which are added by
> FreemarkerHelper. Not sure how to handle this, for two reasons:
> - "message" seems a too generic key name (ie it might "accidentally" be used
> by the template for another purpose)
> - we're having more and more "default values" added to the freemarker
> context, and maybe they just all belong to the magnolia context, which is
> already exposed to the template as "ctx".
> The feature where we passed a template stream/reader to FreeMarker templates
> inline also needs a review/cleanup. It is used by the mail module and we
> could probably be using a TemplateLoader to achieve this. In fact, Freemarker
> provides an abstract URLTemplateLoader, and it would be fairly trivial to
> implement it so that it fetches a page from a given Magnolia instance pretty
> much the same way the mail module does it at the moment.
--
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]>
----------------------------------------------------------------