Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-1788

Simplify / remove FreemarkerUtil, handling of AlertUtil/message in FreemarkerHelper and other improvements.

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 3.5 RC1
    • core

      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.

        Acceptance criteria

              gjoseph Magnolia International
              gjoseph Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD