Servigistics InService Customization > Customizing the Servigistics InService User Interface > Customizing UI Layout and Attribute Templates
  
Customizing UI Layout and Attribute Templates
Much of the Servigistics InService UI has been broken down into smaller HTML templates that get brought together to make up the overall pages. These templates allow customizers to copy and override the OOTB UI pages with their own customizations.
Identifying Template Files
The first step is to identify the template file that needs to be updated. This can be done by looking at the HTML of the page. Embedded in the HTML are comments that contain the name of the various templates used to generate the page. Each section generated by a template has a “begin” and “end” comment in the following format:
<!--begin data-ptc-template-source: <template name> -->
<!--end data-ptc-template-source: <template name> -->
Everything between these two comments is generated by the specified template. Identify the template that needs to be customized by performing the following steps:
1. Navigate to the Servigistics InService page in question and open up the browser’s Developer Tools window (usually by pressing F12).
2. Using the Developer Tools “Select Element” feature, click the UI element you are interested in. This highlights the HTML DOM element in the Developer Tools window.
3. From that point, look for the nearest enclosing element that has a comment beginning with “begin data-ptc-template-source”. This comment has the name of the template that your element is defined in. For example:
<!-- begin data-ptc-template-source: templates/partsListItem.tmpl.html -->
Updating Template Files
Once the file is identified, creating a custom template can be done as follows:
1. Find the template in question under the <WT_HOME>/codebase.war/delivery/templates directory and copy it to the same directory structure under <WT_HOME>/codebase.war/delivery/custom/
2. Make any necessary changes to the custom template html.
3. From a Windchill shell run the following command: java com.ptc.sc.util.TemplateMapGenerator <WT_HOME>/codebase.war/delivery/templateMap.js <WT_HOME>/codebase.war/delivery/custom
* 
JAVA_HOME must be set to the location of the Java executable.
4. Rebuild the client artifacts by running the following command from a Windchill shell: <ANT_HOME>/bin/ant -f <WT_HOME>/codebase.war/delivery/minimize.xml
* 
The <WT_HOME>/codebase.war/delivery/templateMap.js file is used to add redirect mappings for files that have been customized. For example, ‘return {“templates/search/advancedSearch.tmpl.html”: “custom/”};’ tells the client to look for codebase.war/delivery/custom/templates/search/advancedSearch.tmpl.html instead of codebase.war/delivery/templates/search/advancedSearch.tmpl.html.
This means that “custom/” in this example is simply a prefix that is used to indicate the base folder containing the custom files and folders. There is no fallback mechanism. All mappings must have a corresponding customized template file. Since the template files are html files, any html or AngularJS syntax can be used, and is rendered by the client.
Adding Custom Attributes
See Attributes or more information about using the Attributes utility.
Customizing Attributes Example
Try to update an Create Generic Notes Attribute from NotesResource.js, and try to send an attribute value of null.
1. Create an Attribute of Real Number Type.
2. Create a Note with attribute value null.
For example testAttribute with a value of null.
{
"breadcrumbPath": "Generic-Note", //$translate.instant('GENERIC_NOTE')
                        "testAttribute": null
}