file
Reads the named file and returns its content.
Summary
| Parameter
|
Description
|
Default
|
| name |
The name of the file. |
None |
| type |
File type. |
None |
| interpolate |
Process any Interchange tags found in the text output from this tag. |
No
|
Examples
Perl example
$Tag->file({
name => $column,
type => $type,
});
|
or similarly with positional parameters:
|
$Tag->file($name, $type);
|
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 returns the file's content verbatim.
If you want the file's content to be
interpolated for Interchange
tags then use the [include] tag instead.
|
Warning
File names beginning with "/" or ".." are not
allowed if the Interchange server administrator has set the
NoAbsolute configuration directive to "Yes".
|
Parameters
name
The name of the file.
type
If this parameter is set to one of "mac",
"dos",
"windows" or
"unix" then the file's line endings will be corrected.