ISML Function - ContentURL()



Short Description

reference static content in the static content directory of the current unit

Table of Contents

Product Version


Product To Version



1 Introduction

The ContentURL() function is used to reference static content in the static content directory of the current unit, e.g., share/sites/<site_name>/<version-id>/static/units/<unit_name>/static.

2 Syntax

ContentURL(<contentRef>, [<locale>])
ContentURL(<contentRef>, [<locale>], [<servergroup>])

3 Example

The following example shows how to reference an image of an offer within a unit:

<img src=#ContentURL(Product:OfferedProduct:Image)#>

When the template is processed, the content reference replaces the ISML expression Product:OfferedProduct:Image. You can reference a product image with or without mentioning the unit it belongs to (e.g., Officeland:/images/calc.gif or /images/calc.gif). This is shown below, along with the possibility to provide a locale ID:

<img src=#ContentURL('images/calc.gif', 'de_DE')#>

In the example, the ISML function ContentURL() parses the string parameter given in brackets to extract unit and path names, and produces the following URL:


The abstract result of the ContentURL() function parsing the string parameter is the following:


Unit and path names are separated by a colon, as shown below:


For example, the following reference

<a href="#ContentURL('PrimeTech:zips/','de_DE')#">

is resolved to

http:// <>/is-bin/intershop.static/WFS/PrimeTech-PrimeTechSpecials-Site/…PrimeTech/de_DE/zips/

The elements of this URL are explained in Table below.
Web Root Elements

URL Element



Specified by the property intershop.template.(Https)WebRootURL, the default value of which is /is-bin/intershop.static(see the file).


Server group


Current site


Unit specified by the ContentURL parameter


Locale specified by the ContentURL parameter. If no locale is provided, the fallback described above is used.


Resource path; Intershop 7 business objects (e.g., Products) hold relative paths to the static content that is assigned to them. The syntax of such a path name is <unit_name>:<path>.

4 Parameters

4.1 content reference

The content reference is a required parameter that references static content (e.g., /images/calc.gif).

4.2 locale

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

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

4.3 servergroup

This optional parameter can be used to override the default server group. If left unspecified, the first value from the application server property intershop.server.assignedToServerGroup is used.

Reference - ISML Functions


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