Class OfbizUrlTransform

All Implemented Interfaces:
freemarker.template.TemplateModel, freemarker.template.TemplateTransformModel

public class OfbizUrlTransform extends Object implements freemarker.template.TemplateTransformModel
Freemarker Transform for creating OFBiz URLs (links).

This transform accepts several arguments:

  • fullPath (true/false) - generate a full URL including scheme and host, defaults to false.
  • secure (true/false) - generate a secure (https) URL, defaults to false. Server settings will override this argument.
  • encode (true/false) - encode the URL, defaults to true. Encoding is UTF-8.
  • webSiteId - generate a full URL using the web site settings found in the WebSite entity.
  • controlPath - override the default control path.

In addition, this transform accepts an environment variable - urlPrefix. If the variable exists, it is prepended to the contents of the transform (the part between <@ofbizUrl> and </@ofbizUrl>), and all transform arguments are ignored.

  • Constructor Details

    • OfbizUrlTransform

      public OfbizUrlTransform()
  • Method Details

    • getWriter

      public Writer getWriter(Writer out, Map args)
      Specified by:
      getWriter in interface freemarker.template.TemplateTransformModel