InfoPanelPopup.template

Last update: 2021-07-12
  • Created for:
  • Developer
    User

[InfoPanelPopup.|<containerId>_infoPanelPopup.]template= *template*

template

The content template that the data returned from the info server is merged into.

The content template is an XML following this DTD:

<!DOCTYPE info [ <!ELEMENT info (var #PCDATA) <!ELEMENT var (#PCDATA)> <!ATTLIST var  name CDATA #REQUIRED rollover CDATA #IMPLIED > ]>

The actual syntax for the content template is the following:

<info> <var name='VAR_NAME' rollover='ROLLOVER_KEY'><!CDATA[ VAR_VALUE ]> <![CDATA[ TEMPLATE_CONTENT ]> </info>

That is, the template must start with the <info> element that may contain optional default <var> elements. The template content itself, TEMPLATE_CONTENT is HTML text. In addition, the content template may contain variable names enclosed in $ characters. Those characters are replaced with the variable values that the info server returns or with default ones.

Default variables that are defined in the template can be either global (if rollover attribute is not set) or specific to a certain rollover key (if rollover attribute is present).

During template processing variables that are specific to roll over keys take precedence over global variables.

NOTE

Be aware that when you configure Info Panel Popup, the HTML code and JavaScript code passed to the Info Panel runs on the client’s computer. Therefore, make sure that such HTML code and JavaScript code are secure.

Properties

Optional.

Default

None.

Example

Assuming that the info server response returns the product name as variable $1$ and product image URL is returned as variable $2$.

template=<info><![CDATA[Product description:$1$<br>Product image:<img src="$2$">]]></info>

On this page