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.

Note: You should make these configuration changes in the Test environment and test them before copying them to the Production environment. In a dedicated SaaS deployment, after testing the changes, ask IXIASOFT Customer Support to copy the changes to the Production environment.
  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.
  3. If your server is not displayed in the view, add it by doing the following:
    1. To find the server name, click Window > Preferences and select IXIASOFT CCMS.
      In the TEXTML Server Connection section, the server name is the Hostname.
    2. Copy the Hostname and close the Preferences window.
    3. In the TEXTML Administration view, right-click and select Add Server.
    4. In the Server field, enter the server name.
      The Port field should fill automatically. If you need the port number, you can find it in the same place as the server name in the Preferences window.
    5. Click OK.
  4. When the Connect as dialog opens, type your username and password and click OK.
  5. Double-click the name of your Content Store to open a connection to it.
  6. Expand the Content Store's Repository node and browse to /system/conf/ to locate the templateparameters.xml file.
  7. Right-click templateparameters.xml and click Check Out.
  8. Double-click the file to open it in the XML editor area.
  9. In the parameters element, define your new parameter or edit an existing example to meet your needs.
  10. Save, close, and check in the templateparameters.xml file.
  11. 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>