Desktop User Guides > Professional > Interview scripting > Writing interview scripts > Page layout facilities > Templates > Displaying response controls side by side with question text > Banners (information texts)
Banners (information texts)
To display banner (information) text, place the following statement in the template at the point you want the text to appear on the page.
<mrBannerText [Index="number"] [Name="name"]> [Text] </mrBannerText>
number is the number of the banner to be inserted.
name is the name of the banner to be inserted.
Text is any text of your choice. The interviewing program ignores this text, but it is useful if you want to test your template by opening the .htm file in your browser. In this case the text will be displayed in the position and with the attributes defined in the file.
For example, suppose that the metadata section defines an information item called bantxt which contains the words PERSONAL DETAILS”. If the routing section contains the statements:
IOM.Banners.Add("ban01", bantxt.Label)
IOM.Banners["ban01"].Style.Font.Effects = FontEffects.feBold
IOM.Banners["ban01"].Style.Font.Size = 12
and the template contains:
<mrBannerText Name = "ban01"/>
<mrData QuestionElement = "Label"/><mrData QuestionElement = "Controls"/>
the page for personal details will be displayed as follows:
12-point, bold banner text displayed above questions with side-by-side text and responses
This graphic is described in the surrounding text.
The name and number parameters are both optional with <mrBannerText>. You can combine statements that use name with statements that use number, and with statements that use neither. This gives you ultimate flexibility in the way your template can control any number of banner texts on a page. For instance, suppose your banner template is:
<mrBannerText Index=1/>
<mrBannerText Name="ban03"/>
The first banner defined for the page replaces <mrBannerText Index=1/>. The banner named ban03 replaces <mrBannerText Name="ban03"/>. Any other banners will be inserted in the middle.
The interviewing program ignores <mrBannertText> tags if the current page does not have a banner. This means that there is no need to create special templates for pages that have banner text unless you want the rest of the page to look different from your standard page.
See also
Writing templates