TemplateType

Provides the template type for the current page.

This variable makes it possible to create conditional content in a template based on the identity of the template. Use this variable within a template page to determine the source of the pages delivered by the server.

For standard templates, this variable is defined in the formtype column of the IntradocTemplates table in the templates.hda file.

For search results templates, this variable is defined in the formtype column of the SearchResultTemplates table in the templates.hda file.

For report templates, this variable is defined in the datasource column of the IntradocReports table in the reports.hda file.

For dynamic server pages, this variable is either hcsp or hcsf.

Type and Usage

Output

Returns the template type as a string.

Example

This markup displays a table of template information on the page:

<TABLE>
    <TR><TD>Template Name</TD>
    <TD><$TemplateName$></TD></TR>
    <TR><TD>Template Class</TD>
    <TD><$TemplateClass$></TD></TR>
    <TR><TD>Template Type</TD>
    <TD><$TemplateType$></TD></TR>
    <TR><TD>Template File Path</TD>
    <TD><$TemplateFilePath$></TD></TR>
</TABLE>

See Also