Add custom variables to a map template

You can add variables or parameters to the map template to provide fields to users so they can enter variable values at map creation. These template parameters are available in CCMS Desktop only.

About this task

This procedure is the first of two required to make template parameters function within a map template. For a fuller understanding of the whole process, start with Using template parameters.

Important:

If you are adding variables to an existing map template, verify that the following template variables are present in the template: {{ixia.id}}, {{ixia.xml:lang}}, and {{ixia.title}}.

For example:

<map id="{{ixia.id}}" xml:lang="{{ixia.xml:lang}}">
    <title>{{ixia.title}}</title>

These variables are required to make any additional custom variables work.

Procedure

  1. Open the TEXTML Administration perspective and connect to the server.
  2. Navigate to system/conf/templates/maps.
  3. If necessary, further navigate into the subfolder where the map template is located.
  4. Check out and open the map template in a text editor.
  5. Add the metadata elements required in the map.

    For example, here is a <topicmeta> element that includes elements to record the author, copyright year, copyright holder, product name, and version:

    The copyright holder is always your company (Acme, Inc.), so you can ""hard code" that value. The other information is likely to vary from map to map.

    <topicmeta>
    	<author></author>
    	<copyright>
    		<copyryear year=""/>
    		<copyrholder>Acme, Inc.</copyrholder>
    	</copyright>
    	<prodinfo>
    		<prodname></prodname>
    		<vrmlist>
    			<vrm version=""/>
    		</vrmlist>
    	</prodinfo>
    </topicmeta>
  6. For each piece of information that will vary, enter a variable:
    <topicmeta>
    	<author>{{acme.authorname}}</author>
    	<copyright>
    		<copyryear year="{{acme.copyright}}"/>
    		<copyrholder>Acme, Inc.</copyrholder>
    	</copyright>
    	<prodinfo>
    		<prodname>{{acme.productname}}</prodname>
    		<vrmlist>
    			<vrm version="{{acme.prodversion}}"/>
    		</vrmlist>
    	</prodinfo>
    </topicmeta>

    You cannot use spaces or special characters in the variable names. It's a good idea to include your company name, so that you can easily identify these variables as your own.

  7. Make a note of the variable names you have created.

    You need these names in the next step, which is to associate template variables with parameters, as explained in Configure parameters for a map template.

  8. Save and check in the template file.
  9. Inform users of the changes.
    The changes are automatically applied once users close and then reopen their IXIA CCMS Desktop. Users can also apply the changes without restarting their CCMS Desktop by clicking IXIA CCMS > Synchronize Configuration.