ISML Function - WebRootEx()

Name

WebRootEx()

Short Description

references static content within ISML templates, returns an absolute URL

Table of Contents

Product Version

6.5

Product To Version


Status
final

1 Introduction

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.

2 Syntax

WebRootEx(<protocol>,<host>,<port>,<servergroup>,<locale>)

3 Example

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"/>

4 Parameters

The following parameters are required.

4.1 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.

4.2 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.

4.3 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.

4.4 locale

locale = string
This parameter can be used to override the default locale. If left unspecified, the following fallback values will be used:

  1. the request's current locale
  2. the lead locale
  3. the locale will be designated as a missing parameter -

Reference - ISML Functions

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets