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.
The behavior of the <ISFILEBUNDLE> tag depends on following properties listed in <IS.INSTANCE.SHARE>/system/config/cluster/appserver.properties:
Property | Default Value | Description |
---|---|---|
intershop.template.isfilebundle.CheckSource |
| 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 |
| The <ISFILEBUNDLE> tag bundles one or more files of the same type to one big file. |
intershop.template.isfilebundle.Process |
| 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. |
<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>
<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>
name
This attribute is required. name = relative target path
Specifies the relative path to the bundled file.
processors
This attribute is required. processors = comma separated default processor list
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
JSCompressor
SemicolonAppender
SemicolonAppender
.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.