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

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


    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Do
    • Affects Version/s: 3.5 RC1
    • Fix Version/s: None
    • Component/s: core
    • Labels:


      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.


          Issue Links



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


                • Created:
                  Date of First Response: