Document Tree
Document Properties
Kbid
24729B
Last Modified
04-Feb-2020
Added to KB
20-Jun-2013
Public Access
Everyone
Status
Online
Doc Type
References
Product
  • ICM 7.10
  • ICM 11
  • ICM 12
ISML Tag - ISRENDER

Name

ISRENDER

Short Description

renders files of file bundle

Table of Contents

Product Version

6.5

Product To Version


Status

Introduction

The <ISFILEBUNDLE> tag allows you to bundle multiple smaller source files into one big file and to configure processors for the bundled files. <ISFILEBUNDLE> has the two supporting tags <ISFILE> and <ISRENDER>.

Each file bundle must have one <ISRENDER> tag. <ISRENDER> provides a render method for all resulting files of this file bundle. The attribute 1831116388is the name of the bundle or the name of one of the configured files.
A file bundle must have one or more <ISFILE> tags. <ISFILE> is used to declare files to be processed via its name attribute.

Syntax

All <ISFILEBUNDLE> tags must have one <ISRENDER> tag.
The <ISRENDER> tag provides a render method for all resulting files of this filebundle. This tag is only allowed inside an <ISFILEBUNDLE> tag.

Example

The following example shows how to use <ISRENDER>. The URL of the target file consists of the path of the web root and the file name.

<head>
...
  <isfilebundle name="/bundles/BundledCSSFile.css" processors="CSSCompressor">
    <isrender>
      <link type="text/css" rel="stylesheet" href="#webRoot().'/'.File:Name#" media="all">
    </isrender>
    <isfile name="/css/CSS_File1.css"/>
    ...
    <isfile name="/css/CSS_File3.css"/>
  </isfilebundle>
  <isfilebundle name="/js/bundles/BundledJSFile.js" processors="JSCompressor, SemicolonAppender">
    <isrender>
      <script src="#webRoot().'/'.File:Name#"></script>
    </isrender>
    <isfile name="/js/JS_File1.js"/>
    ...
    <isfile name="/js/JS_File4.js"/>
  </isfilebundle>
...
</head>

The previous example uses only the name for the URL. A web developer may run into browser cache problems. Because the URL does not change when the file content changes. To avoid such problems it is helpful to append the modification date of the target file. Use <ISPRINT> to print the variable lastModified(integer) in the correct format.

...
<head>
...
  <isfilebundle name="/bundles/BundledCSSFile.css" processors="CSSCompressor">
    <isrender>
      <link type="text/css" rel="stylesheet" href="#webRoot().'/'.File:Name?lastModified=<isprint value="#File:LastModified#" formatter="0">#" media="all">
    </isrender>
    <isfile name="/css/CSS_File1.css"/>
    ...
    <isfile name="/css/CSS_File3.css"/>
  </isfilebundle>
...

When the file content changes, the date of the last modification changes too. So the URL will be updated and the web browser can check for the modified files.

CSSCompressor

Note

This feature is available from Intershop 7.6. 

The CSSCompressor compresses all CSS file to one file and removes all white-spaces during the process.

You can turn it off via the property intershop.css.compress.enabled=false if you have problems with compressing CSS with arithmetics. See also IS-26670 - YUICompressor generates incorrect css.

It is enabled by default.

Attributes

The <ISRENDER> tag provides the attribute File. This attribute is an instance of an implementation from interface com.intershop.beehive.core.capi.resource.Resource.
The File attribute supports the attributes Name and lastModified. Name is the relative path and lastModified is date of the last modification of the target file.

File:Name

The name of the bundle or the name of one of the configured files.

File:lastModified

The last date of modification.

Reference - ISML Tags

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.
The Intershop Knowledge Portal uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties. Please find further information on privacy in the Intershop Privacy Policy and Legal Notice.
Home
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to supportadmin@intershop.de if you experience login issues,
or if you want to register as customer.