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
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.
-
Field Summary
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
OfbizUrlTransform
public OfbizUrlTransform()
-
-
Method Details
-
getWriter
- Specified by:
getWriter
in interfacefreemarker.template.TemplateTransformModel
-