Template example
This example shows one of the default templates, table.html, that is supplied with Tivoli Netcool/OMNIbus.
Each line number is displayed in square brackets:
<!-- ENABLE:SMARTPAGE -->
<!-- Validate: [all,redirect.html] -->
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
</head>
<body>
<!-- INSERT:TABLEVIEW[<NCO_V type="str" default="">Map_Name</NCO_V>
/<NCO_V type="str" default="">System_Filter</NCO_V>] -->
</body>
</html>
The insert:TABLEVIEW command cannot include carriage returns.
In this example, the template file contains a SmartPage command for displaying a Table View. The insert:TABLEVIEW command has two attributes: Map_Name and System_Filter . Instead of a static data entry for each attribute value, the source contains an <NCO_V> element, the attributes of which are as follows.
- type=
type
- This entry specifies the type of variable data that the
<NCO_V>
tag can receive from the URL. The data types are as follows:- str
- A text string that can include any text except quotation marks.
- BOOLEAN
- Used for attribute entries such as showinframe in the insert:AEL SmartPage
tag. Permitted values are
true
orfalse
. - number
- Any whole integer. Used for attribute entries such as monitorwidth in the insert:FILTERPAGE tag.
- default=
value
- This entry specifies the default variable value that is used if one is not provided by the URL.
In the case of the insert:TABLEVIEW command,
the attributes are names, and therefore strings. The expected variable
data for both <NCO_V> instances is set to str
. No default
attributes are provided, so both default entries are empty.
The text between the opening and closing <NCO_V> tags establishes the variable name that the URL uses to establish a name-value pair. When you specify a variable name, the text must be alphanumeric and multiple words must be separated by an underscore. For example, Map_Name. Variable entries must be separated by a comma.
The URL of template pages containing variable data must be in the following format:
$(SERVER)/path/filename?variable1=variabledata1&variable2=variabledata2
Where path is the path to the template location, filename is the name of the template Web page, variable is the variable enclosed within the <NCO_V> element, and variabledata is the string, Boolean, or numeric entry that you want to populate the variable. For example:
$(SERVER)/Template/table.html?Map_Name=Example_Europe&System_Filter=Example_All