Document Tree
Document Properties
Kbid
24K739
Last Modified
22-Sep-2021
Added to KB
20-Jun-2013
Public Access
Everyone
Status
Online
Doc Type
References
Product
  • ICM 7.10
  • ICM 11
  • ICM 12
ISML Tag - ISFILEBUNDLE

Name

ISFILEBUNDLE

Short Description

bundles small source files

Table of Contents

Product Version

7.10

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 variable File:Name (see example below) is 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.

Configuration

The behavior of the <ISFILEBUNDLE> tag depends on the following properties listed in <IS.INSTANCE.SHARE>/system/config/cluster/appserver.properties:

Property

Default Value

Description

intershop.template.isfilebundle.CheckSource

false

If set to true, the <ISFILEBUNDLE> tag checks during every request if the corresponding ISML files, the JavaScript files or the CSS files are out of date. The corresponding file will be processed and bundled again if this file is out of date. This process can lead to performance problems in live systems. So this property should be set to false for such systems.

intershop.template.isfilebundle.Combine

true

The <ISFILEBUNDLE> tag bundles one or more files of the same type to one big file.

intershop.template.isfilebundle.Process

true

The <ISFILEBUNDLE> tag executes the configured processors. In most cases, this is a compressor which minimizes the given files by removing white spaces and comments.

intershop.template.isfilebundle.jsprocessoryuiDefines which JavaScript processor is used. The value 'yui' selects the YUICompressor (deprecated, some modern JavaScript features are not supported), 'closure' selects the Google Closure compiler (recommended processor, strictly requires JavaScript). If the property is not defined or contains an invalid value, 'yui' is used as a fallback (since 7.10.16.3). 

Syntax

<isfilebundle
name = "{relative target path}"
processors = "{comma separated default processor list}"
>
<isrender>
... some HTML and ISML code ...
</isrender>
[ <isfile
name = "{relative source path}"
[ processors = "{comma separated processor list}" ] />
]
</isfilebundle>

Example

<isfilebundle name="/css/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_File2.css"/>
  <isfile name="/css/CSS_File3.css"/>
  <isfile name="/css/CSS_File4.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_File2.js"/>
  <isfile name="/js/JS_File3.js"/>
  <isfile name="/js/JS_File4.js"/>
</isfilebundle>

Attributes

name

This attribute is required.
name = relative target path

It specifies the relative path to the bundled file.

Note

Make sure that the source file name(s) differ from the bundle target name. Always use different names, otherwise the changes will take no effect.

In case the names are identical, a warn message is printed to the WARN log indicating what needs to be changed.

processors

This attribute is required.
processors = comma separated default processor list

It specifies the components that should process the declared files. The values must be a comma-separated list of valid processor names. The processors are executed in reverse order (from last to first).

The following three processors are available:

  • CSSCompressor
    Minimizes a CSS file.
  • JSCompressor
    Minimizes a JavaScript file.
  • SemicolonAppender
    Appends a semicolon (";") to the end of each file. Normally there is no need to do this. However, for the bundling of some JavaScript files it is necessary to add a ";" at the end of the file. It is recommended to fix this issue directly in the files instead of using this SemicolonAppender.

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.