include
Reads the named file and returns its content.
Summary
| Parameter
|
Description
|
Default
|
| file |
The name of the file to read. |
None |
| locale |
Make use of locales when parsing the included file. |
Yes
|
Examples
Perl example
$Tag->include({
name => $column,
locale => $locale,
});
|
or similarly with positional parameters:
|
$Tag->include($name, $locale);
|
Description
Reads the named file and returns its content to the caller.
The file should normally be relative to the website's home directory,
as set up using the Catalog global configuration
directive.
If TemplateDir directive is in use,
and the file was not found relative to the website's home directory,
then the directories in the templateDir list will
be tried.
This tag interpolates
any Interchange tags found in the named file,
and returns the resulting text.
If you want the file's content to be returned
verbatim then use the [file] tag instead.
|
Warning
File names beginning with "/" or ".." are not
allowed if the Interchange server administrator has set the
NoAbsolute configuration directive to "Yes".
|
|
Warning
If the file contains Loop sub-tags
then they will be output verbatim,
and not parsed as you might have expected.
Interchange 5.5.2 introduced a new [PREFIX-include]
loop sub-tag for this purpose.
|
|
Note
Files can include other files.
The maximum number of nested inclusions can
be controlled by the Limit directive's
"include_depth" setting.
|
Parameters
file
The name of the file to read.
locale
Make use of locales when parsing the included file.
Tries to use POSIX setlocale() along with the definitions
of "decimal_point", "mon_thousands_sep" and
"frac_digits" etc.,
as declared using the Locale and/or
LocaleDatabase local configuration
directives.
If this parameter is false then the value of the current locale's "readfile" key will be used.