Customizing Web Pages
The web pages served up by the CGI program are generated by reading HTMPL files, and using them to generate HTML dynamically. HTML template files are identified by a file suffix of .htmpl. You can modify these template files, and thereby customize the Unicenter Service Desk web pages.
The Four Interfaces section earlier in this chapter describes the web interfaces supplied with Unicenter Service Desk. There are three sets of HTMPL files supplied to implement these interfaces, as shown in the following table:
Interface
Directory Containing HTMPL Files
Analyst
Windows: installation-directory \bopcfg\www\htmpl
UNIX: $NX_ROOT/bopcfg/www/htmpl
Self-Service and Guest
Windows: installation-directory \bopcfg\www\cst_htmpl
UNIX: $NX_ROOT/bopcfg/www/cst_htmpl
PDA
Windows: installation-directory \bopcfg\www\pda_htmpl
UNIX: $NX_ROOT/bopcfg/www/pda_htmpl
Note that the self-service and guest interfaces use the same set of template files.
The templates dynamically modify the interface depending on whether the current user is a known user or a guest, using the <PDM_IF> template command documented below.
We strongly recommend that you do not directly modify the supplied HTMPL files. Instead, copy the file you want to modify to the site mods directory, and modify it there. The Unicenter Service Desk web server looks for a new form in the appropriate site mods directory before checking the distribution directory.
There are site mods directories for each of the interfaces, as shown below:
Interface
Directory For Site-Modified HTMPL Files
Analyst
Windows: installation-directory \site\mods\www\htmpl
UNIX: $NX_ROOT/site/mods/www/htmpl
Self-Service and Guest
Windows: installation-directory \site\mods\www\cst_htmpl
UNIX: $NX_ROOT/site/mods/www/cst_htmpl
PDA
Windows: installation-directory \site\mods\www\pda_htmpl
UNIX: $NX_ROOT/site/mods/www/pda_htmpl
The advantage of storing your modified HTMPL files in the site mods directory is that this directory is preserved when you install Unicenter Service Desk maintenance or a new release. In addition, keeping your modified files in site mods while preserving the originals ensures that you always have a correct copy of the originally distributed HTMPL file.
You can edit the copy of the HTMPL file in the site mods directory with any standard text editor. In addition, you can use the Microsoft FrontPage editor to edit and preview HTMPL forms. Unicenter Service Desk includes a set of add-in functions for Microsoft FrontPage to make it more useful for editing HTMPL files. Each web interface page has a primary function, as in the table below that lists the major HTML templates. However, you can add <PDM_FORM> blocks to any template to directly access any web interface supported operation. For example, you can modify the main menu to include fields for submitting a request without using the intermediate page, or you can add search criteria fields and a search
button to a list form:
Web Page
HTML Template
Main form
menu_frames.htmpl
Create/update request
detail_cr_edit.htmpl
Create/update change order
detail_chg_edit.htmpl
Display request detail information
detail_cr_ro.htmpl
Display change order detail information
detail_chg_ro.htmpl
Display list of requests
list_cr.htmpl
Display list of change orders
list_chg.htmpl
Display announcement detail information
detail_cnote_ro.html
Display list of announcements
list_cnote.html
Login
login.htmpl
Note: For a complete list of templates, view the contents of the directories mentioned earlier.
Template Naming Conventions
The following naming conventions are used to identify the four basic types of HTMPL files, where xxx is the object:
Template Type
Name
List (search filter and results)
list_xxx.htmpl
Detail that cannot be updated (read-only)
detail_xxx_ro.htmpl
Detail that can be updated (editable)
detail_xxx_edit.htmpl
You can find the definitions of the objects and their properties in $NX_ROOT/bopcfg/majic/*.maj (UNIX) or installationdirectory \ bopcfg\majic\*.maj (Windows). See the appendix “Objects and Attributes” in the Advanced Customization Guide for additional information.
Modifying HTML Templates
Important! You must be familiar with HTML to modify the HTML templates.
Typically, you can make two types of changes to the HTML templates:
  • You can make modifications that will be visible to the user but will not be altered by the web interface prior to display. For example, you could add a GIF file for your company logo to the web interface pages (a “pass through”) by adding the reference to the appropriate template file or you could add JavaScript to your page to validate input. Any changes you make to the HTMPL file that are not contained within a PDM tag, as defined below, are passed unchanged in the HTML returned to the user.
  • You can modify the replaceable sections of the templates. For example, you could add new application data to the request detail page.
Several kinds of template entries let you:
  • Display information from Unicenter Service Desk to the user
  • Set up a query page
  • Create links to other Unicenter Service Desk pages using link tags