Professional > Interview scripting > Writing interview scripts > Page layout facilities > Templates > Writing templates
 
Writing templates
Templates are text files that contain template XML tags, optionally with other standard HTML tags, and that have a .htm extension. Template XML tags are easy to recognize because they all start with “mr”. They are documented in detail in this section. For a quick reference guide, see Template XML schema.
You can create a very basic template using programs such as Notepad or Wordpad. Enter the template XML tags that define the items that you want to appear on the interview page, and then save the file with a .htm extension.
Note If the template contains non-English characters such as characters with umlauts, you must save the template in UTF-8 or Unicode format otherwise these characters will be displayed as ?.
For example, a template that produces the same page layout as the default is:
<html>
<head></head>
<body>
<mrBannerText/>
<br/>
<mrData/>
<br/>
<mrNavBar/>
</body>
</html>
<mrBannerText/> defines the position of information texts, <mrData/> defines the position of the question and its response list, and <mrNavBar/> defines the position of the navigation buttons.
Because this does not produce very interesting pages, you will probably want to include standard HTML formatting tags to insert font, point size, and color changes and to define the exact position of the components on the page. You can do this either by typing the tags into a standard text file, or by using a program such as FrontPage that converts your formatting requests into HTML code. For example:
<html>
<head></head>
<body>
<center>
<b>
<font color="blue" size="4"
               face="Arial"><mrPageTitle/></font>
</b>
</center>
...
</body>
</html>
This displays the page title in large, bold, blue text in the center of the first line on the page.
See also
Debugging template errors
Example templates
Tips for writing templates
Using forms
Questions, responses, and error messages
Banners (information texts)
Page titles
Navigation buttons
Progress bars
Sub-templates
Referring to external files
Custom controls
Clickable response texts
Adding CSS class names to the rendered HTML
Templates