Hitachi

JP1 Version 12 JP1/Navigation Platform Content Editing Guide


4.13.10 Using parameters in HTML parts

Suppose that you select the Embed parameters in HTML source string check box in the Attribute Settings window (HTML parts in the guide area) and embed one of the parameter names defined in Parameter list into an HTML source string typed into the HTML source string text box. In this case, when you display HTML content, the parameter name within the HTML source string is converted to a parameter value and then displayed.

Embedding a parameter name into an HTML part allows you to reuse the HTML part because all you have to do is change the parameter value.

You can embed a parameter into an HTML source string by using the following formats:

The detailed procedures for embedding a parameter name into an HTML source string and for converting the parameter name to a parameter value are provided below for each format.

Organization of this subsection

(1) Embedding a parameter into an HTML source string by using the {{param}} format (format used when escaping HTML special characters)

When you embed one of the parameter names defined in Parameter list into an HTML source string typed into the HTML source string text box by using the {{param}} format, the value enclosed between {{ and }} is converted to the parameter value corresponding to the parameter name. When this format is used, any HTML special symbols (& < > " ' / ` =) within the parameter value are escaped and converted to the corresponding HTML escape strings described in the following table.

Table 4‒5: HTML special symbols and the HTML escape strings to which they are converted

HTML special symbol

HTML escape string to which each HTML special symbol is converted

&

&amp;

<

&lt;

>

&gt;

"

&quot;

'

&#39;

/

&#x2F;

`

&#x60;

=

&#x3D;

Notes:
  • A parameter name that has one or more single-byte spaces before or after param is ignored.

  • When a parameter name specified with param is not defined in Parameter list, the {{param}} portion is converted to empty characters.

  • When }} is not accompanied by a preceding {{, }} is treated as a normal character string.

  • When {{ is not accompanied by a succeeding }}, none of the parameter names embedded into the HTML source strings in the target HTML part is converted to a parameter value.

(Example of how a parameter name is converted to a parameter value)

An example of how a parameter name specified with param is converted to a parameter value is provided below.

  • Example of parameter names defined in Parameter list

    Parameter name

    Parameter value

    param1

    value1

    param2

    <span>value2</span>

    param3

    value3

    param4

    value4

    param5

    value5

  • Examples of how to enter parameter names

param1: {{param1}}
param2: {{param2}}
param3: {{  param3  }}
param4: {param4}}
param5: param5}}
  • Examples of how parameter names are converted into parameter values

param1: value1
param2: &lt;span&gt;value2&lt;&#x2F;span&gt;
param3: value3
param4: {param4}}
param5: param5}}

(2) Embedding a parameter into an HTML source string by using the {{{param}}} format (format used when not escaping HTML special characters)

When you embed one of the parameter names defined in Parameter list into an HTML source string typed into the HTML source string text box by using the {{param}} format, the value enclosed between {{{ and }}} is converted to the parameter value corresponding to the parameter name. When this format is used, any HTML special symbols (& < > " ' / ` =) within the parameter value are escaped and converted to the corresponding HTML escape strings described in the following table.

Notes:
  • A parameter name that has one or more single-byte spaces before or after param is ignored.

  • When a parameter name specified with param is not defined in Parameter list, the {{{param}}} portion is converted to empty characters.

  • When }}} is not accompanied by a preceding {{{, }}} is treated as a normal character string.

  • When {{{ is not accompanied by a succeeding }}}, none of the parameter names embedded into the HTML source strings in the target HTML part is converted to a parameter value.

(Example of how a parameter name is converted to a parameter value)

An example of how a parameter name specified with param is converted to a parameter value is provided below.

  • Example of parameter names defined in Parameter list

    Parameter name

    Parameter value

    param1

    value1

    param2

    <span>value2</span>

    param3

    value3

    param4

    value4

    param5

    value5

    param6

    value6

  • Examples of how to enter parameter names

param1: {{{param1}}}
param2: {{{param2}}}
param3: {{{  param3  }}}
param4: {{param4}}}
param5: {param5}}}
param6: param6}}}
  • Examples of how parameter names are converted into parameter values

param1: value1
param2: <span>value2</span>
param3: value3
param4: value4}
param5: {param5}}}
param5: {param6}}}