Desktop User Guides > Professional > Interview scripting > Writing interview scripts > Page layout facilities > Templates > Naming templates in the script
 
Naming templates in the script
Each interview script should have at least one template associated with it, and some scripts might require more than one template. If a script has no templates associated with it, the interviewing program will use its default layout (see Default layout template).
The way a question or text is displayed during the interview is determined by the layout template in force at that time. You can switch layout templates as many times as you want, but will normally do so to accommodate question types that cannot be displayed using the standard layout.
To name a template you want to use, do one of the following. In the metadata section, type:
templates(type="filename.htm"[, ... typen="filenamen.htm"])
after a question’s or page’s text parameter, or, in the routing section, type:
Item.TypeTemplate="filename.htm"
where:
Item is IOM if the template applies to the whole script or the name of a question or page if it applies to a specific question or page.
Type is the template’s type and is either Layout for the main template or one of Question, Error, Banner, NavBar, or Grid for a sub-template.
filename is the name of the template file.
If you are using sub-templates that are not named in the main template, you will need to name each sub-template separately. For more information, see Sub-templates.
For example, placing:
templates(Question = "quest.htm"
  NavBar = "navigate.htm")
after question texts in the metadata section is the same as placing:
IOM.QuestionTemplate="quest.htm"
IOM.NavBarTemplate="navigate.htm"
in the routing section.
If you do not see the interview pages laid out as you expect when you test your script, and you are sure that there are no syntax errors in your script, see “Templates are not being displayed by the interview” in Troubleshooting the image cache.
See also
Templates