Configure parameters for a map template

Instead of inserting variables into which users enter data, you can configure parameters that can replace the variables with controls such as a datepicker, a select menu, or a constrained text box.

The templateparameters.xml file defines the parameters which can be used with the map templates, and it contains examples of each type of parameter. These existing examples can be changed to suit your needs.

A parameter uses the following code:
<parameter name="[name]" label="[display label]" type="[DATE|TEXT|LIST]" mandatory="[true|false]"/>
Where you replace:
  • [name] with a name for the parameter.
  • [display label] with the text that you want seen by the users in the Create Map dialog box.

To specify whether the parameter is mandatory or optional, set the mandatory attribute. When the mandatory attribute value is set to "true", the user must enter or select a value before a map can be created. When it is set to "false", then the user can leave the value blank.

To define a datepicker, use the DATE type. For example:
<parameter name="PubDate" label="Publication date" type="DATE" mandatory="true"/>

With this example, you can add the PubDate parameter to your map template. When the user creates a map based on the map template, a datepicker called Publication date appears on the Create Map dialog box in the Template Variables table. Since it is defined as a mandatory value, the user must choose a date before being able to click Create.

To constrain the acceptable values that can be entered, you can use the TEXT type with a regex attribute. The regex attribute allows you to use regular expressions (regex) to control what is accepted as a valid value. For example:
<parameter name="BookNum" label="Serial number" type="TEXT" regex="[0-9]{6}" mandatory="true"/>

With this example, you can add the BookNum parameter to your map template. When the user creates a map based on the map template, Serial number appears in the Template Variables table. Before the user can click Create, a six-digit number must be entered in the Values column.

To define a list, use the LIST type and provide a list of values. For example:
<parameter name="AuthorList" label="Author" type="LIST" mandatory="false">
	<value>Doe, John</value>
	<value>Smith, Jane</value>
	<value>Petit, Eve</value>	
	<value>Tremblay, Joseph</value>	
</parameter>

With this example, you can add the AuthorList parameter to your map template. When the user creates a map based on the map template, the Author list appears in the Template Variables table from which the user can select a value.

To define parameters:

  1. Open the TEXTML Administration perspective by clicking the TEXTML Administration shortcut on the tool bar. If the shortcut is not displayed, follow these steps:
    1. Select Window > Perspective > Open Perspective > Other
    2. Click TEXTML Administration.
    3. Click Open.
  2. In the TEXTML Administration view, double-click the server. If your server is not displayed in the view, you must add it to the view.
  3. When the Connect as dialog opens, type your username and password and click OK.
  4. Double-click the name of your Content Store to open a connection to it.
  5. Expand the Content Store's Repository node and browse to /system/conf/ to locate the templateparameters.xml file.
  6. Right-click templateparameters.xml and click Check Out.
  7. Double-click the file to open it in the XML editor area.
  8. In the parameters element, define your new parameter or edit an existing example to meet your needs.
  9. Save, close, and check in the templateparameters.xml file.
  10. Inform users of the changes.
    The changes will be applied automatically once users close and then reopen their IXIASOFT CCMS Desktop. Users can also apply the changes without restarting their CCMS Desktop by clicking IXIASOFT CCMS > Synchronize Configuration.
Important:
If you are adding variables to an existing map template, verify that the following items in the map template have also been replaced by map variables:
  • Replace the existing map ID attribute value with {{ixia.id}}.
  • Replace the existing xml:lang attribute value with {{ixia.xml:lang}}.
  • Replace the existing title with {{ixia.title}}.
For example:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//IXIA//DTD IXIA DITA Map//EN" "../../system/dtd/ixia/IxiaMap.dtd">
<map id="{{ixia.id}}" xml:lang="{{ixia.xml:lang}}">
    <title>{{ixia.title}}</title>