{include} Directive

Enables you to include other HTML files into the current file

Syntax

{include file="web-server-host-pathname" vars="var1=value1&var2=value2&..."}

Required Arguments

file="web-server-host-pathname"
web-server-host-pathname is the pathname (either absolute or relative) for a file that is processed as an htmSQL input file. If the pathname is relative, then it is relative to either the current working directory for htmSQL or to the path of the calling input file. See your setting for the RELATIVE run-time configuration option. You can use a variable reference to specify the filename. For example:
{include file="/dept/web/{&proj}.hsql"}
The value for the file= parameter must be a physical pathname on the Web server machine. It is not a URL.
vars="var1=value1&var2=value2&..."
var1=value1&var2=value2&... is one or more variable name and value pairs that the included input file requires. The variables that you specify exist in the scope of the included file. This scoping is done so that a variable that is set by both the input file and the included file can retain separate values for each file. When htmSQL finishes processing the included file and returns to the calling input file, the value of the variable is restored to the value that it had before the included file was called. If a variable is defined only for the included file, then you cannot access it after htmSQL returns to the calling file.
The following example uses an input file named emps.hsql that requires values for the variables name and status:
{include file="emps.hsql" vars="name={&emp}&status=EXEMPT"}
Note: In this example, you can use one or more variable references (such as {&emp}) in the value for the vars parameter.

Details

The {include} directive enables you to include other HTML files into the current file. The included file can be a simple HTML file or another htmSQL input file. If it is an htmSQL input file, then it must be complete; it cannot contain a partial query or update section.
The {include} directive cannot appear inside any other htmSQL directive section.