ISML Function - ContentURLEx()

Name

ContentURLEx()

Short Description

returns an absolute URL to reference static content

Table of Contents

Product Version

6.5

Product To Version

 

Statusfinal

1 Introduction

The ContentURLEx() function complements the ContentURL()function. It is also used to reference static content. However, in contrast to ContentURL(), the ContentURLEx() function always returns an absolute URL, hence is used in templates in which an absolute URL is required, such as in mail templates.

2 Syntax

ContentURLEx(<protocol>,[<host>],[<port>],[<server group>],[<locale>],[<contentRef>])

3 Example

The following ISML structure:

<img src="#contentURLEx('https','foobar.com','445','BOS','de_DE','Techno:/images/iqscrollingmouse.gif')#"/>

produces the following result:

<img src="https://foobar.xom:445/is-bin/intershop.static/BOS/PrimeTech-PrimeTechSpecials-Site/Techno/de_DE/images/iqscrollingmouse.gif"/>

4 Parameters

Note

If <protocol>, <host>, <port>, <server group> or <locale> are left unspecified or passed as empty strings, the according values are taken from the current request, or, if this fails, from the appserver.properties file.

4.1 protocol

This required parameter can be used to override the default protocol (HTTP). The value is ignored (even if set) if intershop.template.WebRootURL or intershop.template.HTTPSWebRootURL(in config/cluster/appserver.properties) already specifies an absolute URL.

4.2 host, port

If these optional parameters are unspecified, the values intershop.WebServerURL(in case of HTTP) or intershop.WebServerSecureURL(in case of HTTPS) defined in the appserver.properties are default. The values for these parameters are ignored (even if set) if intershop.template.WebRootURL or intershop.template.HTTPSWebRootURL(in config/cluster/appserver.properties) already specifies an absolute URL.

4.3 server group

This parameter can be used to override the default server group. If unspecified, the first value from the intershop.server.assignedToServerGroup defined in the appserver.properties is default.

4.4 locale

This parameter can be used to override the default locale. If left unspecified, the following fallback is used:

  1. Get the locale from the current request.
  2. Get the lead locale.
  3. Set the locale as missing parameter -.

4.5 content reference

References static content (e.g., /images/calc.gif).

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