<ISCONTENT>
modifies the HTTP header of the generated output stream sent to the browser or e-mail client. The HTTP header is identified by its MIME type. In most cases, you do not need to set the type because this is done automatically by the node or pipelet that calls the template. These nodes set the MIME header as follows:
text/html
.SendMail
pipelet text/plain
.If you want to overwrite these defaults, or if you want your template to generate a different type of output (e.g. when using the <ISBINARY>
tag), you can explicitly specify another MIME type in the type attribute.
Additionally, the <ISCONTENT>
tag:
You can also dynamically select <ISCONTENT>
settings.
Note
Due to a JSP limitation, the <ISCONTENT> tag must be placed before any resulting content in the ISML page (including whitespace characters).
<iscontent [ compact = "( true | false )" ] [ templatemarker = "( true | false )" ] [ type = "( {String} | {ISML expression} )" ] [ charset = "{String}" ] [ httpstatus = "( {Integer} | {ISML expression} )" ] [ session = "( true | false )" ] [ personalized = "( true | false )" ] [ encoding = "( on |off | html | xml | wml )" ] >
This example sets the content type and the character set to be used by the ISML-to-JSP compiler:
<ISCONTENT type = "plain/text" charset = "iso-8859-1"> <ISCONTENT compact = "true">
The following attributes are all optional.
compact
compact = true | false
This attribute ensures that all extra white spaces are removed during the template conversion process. See section The Template Conversion Process of the Application Programming Guide for details and examples.
templatemaker
templatemarker = true | false
If set to true
(default), the resulting markup is surrounded by the following two comment lines:
<!-- BEGIN TEMPLATE $templateName$ --> <!-- END TEMPLATE $templateName$ -->
If set to false
, the above comments are omitted from the output.
Note
The default value for this attribute can be set using the intershop.template.PrintTemplateMarker
property in IS_SHARE/system/config/cluster/appserver.properties.
type
type = String | ISML Expression
Specifies the MIME type of the generated output stream. The default value depends on the template type, generally storefront pages are set to plain/HTML
and e-mail output is set to plain/text
.
charset
charset = String
Defines the character set assumed by the ISML-to-JSP compiler when reading the template. See section Character Encoding in the Conversion Process in the Application Programming Guide.
httpstatus
httpstatus = Integer | ISML expression
session
session = true | false
Default value is true
. The session attribute results in a <@page session="true"...>
entry in the JSP file. The servlet engine is able to provide session context information to Java Beans. Such data would be meaningful when the session is originated by an HTTP request. Templates that are not associated with an HTTP request will provide no meaningful context data. Therefore, the session flag should be set to false
for all pipelines executed by means other than an HTTP request.
personalized
personalized = true | false
Templates can be marked as personalized or non-personalized. See Personalized Page Caching for more information on the caching behavior of personalization pages. To activate the personalization feature, the personalized attribute
must be appended to the <ISCONTENT>
tag. This attribute indicates whether a template contains personalized content:
<iscontent personalized="true">
This marks the page for a specific group of users, where the number of cached pages coincides with the number of user groups in your system. For example, if you have ten different user groups, the system caches the page showing product prices ten times according to the specific requirements of the user groups. You cannot select or deselect one or more user groups for page caching.
<iscontent personalized="false">
This page is identical for all users. Regardless of how many user groups exist, a specific page is cached only once.
Note
By default, the value for the personalized attribute is set to false.
encoding
encoding = on | off | html | xml | wml
Default value is on
for the selected content type. Naming a content type, for example html
has the same affect as using the on
flag. All data processed after the first occurrence of <ISCONTENT>
are affected by this setting. encoding
converts characters that could cause a syntax conflict. For example, when set to html
the ampersand symbol "&" is converted to &
.
Note
It is possible, though rarely helpful, to generate one type of content through the type command and then encode the output with a different content type. Generally, the values on
and off
will suffice.