The WebRootEx()
function complements the WebRoot() function. It is also used to reference static content. However, in contrast to WebRoot(), WebRootEx()
always returns an absolute URL, hence is used in templates in which an absolute URL is required, such as in mail templates.
WebRootEx(<protocol>,<host>,<port>,<servergroup>,<locale>)
The following ISML code:
<img src="#webrootEx('','foobar.com','','BOS','de_DE')#"/>
results in the the following HTML code:
<img src="http://foobar.com:80/INTERSHOP/static/BOS/PrimeTech-PrimeTechSpecials-Site/-/de_DE"/>
The following parameters are required.
protocol
protocol = string
This parameter can be used to override the default protocol (HTTP). The value of the protocol is ignored (even if set) if intershop.template.WebRootURL
or intershop.template.HTTPSWebRootURL
(set in config/cluster/appserver.properties) already specify an absolute URL.
host
, port
port = string
host = string
If these parameters are left unspecified, the values for intershop.WebServerURL
(in case of HTTP) or intershop.WebServerSecureURL
(in case of HTTPS) as specified in the appserver.properties are used.
The values for these parameters are ignored (even if set) if {intershop.template.WebRootURL}} or intershop.template.HTTPSWebRootURL
(set in config/cluster/appserver.properties) already specify an absolute URL.
servergroup
servergroup = string
This parameter can be used to override the default server group. If not specified, the first value from the application server property intershop.server.assignedToServerGroup
will be used.
locale
locale = string
This parameter can be used to override the default locale. If left unspecified, the following fallback values will be used:
-