Package org.apache.ofbiz.webapp.ftl
Class OfbizUrlTransform
- java.lang.Object
-
- org.apache.ofbiz.webapp.ftl.OfbizUrlTransform
-
- All Implemented Interfaces:
freemarker.template.TemplateModel
,freemarker.template.TemplateTransformModel
public class OfbizUrlTransform extends java.lang.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.
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.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Constructor Summary
Constructors Constructor Description OfbizUrlTransform()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.Writer
getWriter(java.io.Writer out, java.util.Map args)
-