AutoEnd
Sets a macro that will be automatically executed after every page request.
Synopsis
or
AutoEnd <<EOA
Interchange tags here
EOA
|
The macro can be specified using the name of a Sub
or GlobalSub subroutine,
or it can be a block of Interchange tags.
Perl subroutines are much more efficient, of course.
Scope
This directive is only available for use in the local
(catalog.cfg) configuration file.
It will not affect any other website in any way.
This directive will not work in the global
(interchange.cfg) configuration file.
Description
Sets a macro that will be automatically executed after every page request.
The AutoEnd routine runs after all page processing is complete,
shortly before Interchange closes the database connection and
terminates the page transaction.
Any value returned by the macro will be discarded.
|
Note
As of Interchange 5.4, you can to add multiple
Autoload and AutoEnd calls on separate lines.
Prior to version 5.4, you could only have one directive specification.
|
Example
Log the requesting hostname (or IP address) along with the
name of the requested page,
using the [log] tag.
AutoEnd <<EOA
[log
file=logs/page.log
interpolate=1
][data session ohost] [var MV_PAGE global][/log]
EOA
|
See also