Configuration

As usual in Imperia, all configuration is done via variables in the general configuration file SITE-DIRECTORY/config/system.conf. Note that this is only relevant to pages that belong to the Imperia GUI. If you want to use the template processor for your own purposes, you have to configure it by calling the relevant methods of Imperia::View.:Parser.

Search Paths#

By default, all template files will be searched relative to the directory SITE-DIRECTORY/view/imperia/default. You can override this setting by providing a comma-separated list of search directories in the variable IMPVIEW_INCLUDE:

"IMPVIEW_INCLUDE" = "ci, imperia/default"

Whitespace around the commas is ignored. Paths are resolved relative to the directory SITE-DIRECTORY/view, unless the path name starts with a slash (/). In the latter case the path name is considered to be absolute. On MS-DOS® based systems, a leading ASCII character followed by a colon, for example D: will also lead to an absolute interpretation.

The templates for the Imperia GUI are designed in such a way that the parts of the GUI that are likely to be exchanged for local customization, are usually in distinct files, so that it is easy to adapt the GUI to requirements stipulated by corporate identy issues. In the same way, you can gradually develop your own skins for the Imperia GUI.

View Imports#

By default, functions are imported from a set of default ViewImport plug-ins. You can override this setting with the variable IMPVIEW_VIEWIMPORTS in SITE-DIRECTORY/system.conf:

"IMPVIEW_VIEWIMPORTS" = "MyFuncs, :default, FallBack"

Whitespace around the commas is ignored.

This configuration setting is only important for you, if you want to extend the system by your own Perl code.

Note, that you can refer to the default set of imports with the special name :default.

Error Reporting#

By default, errors are only reported by writing the corresponding error message to the standard error channel. If you want to see them embedded in the output instead, use the following variable in SITE-DIRECTORY/system.conf:

"IMPVIEW_ERRORS" = "STDERR, HTML, JS"

You can pass a list of comma-separated (or colon-separated, or separated by the pipe symbol “|”) values, that describe the kind of error reporting you want.

“STDERR” means, that error messages are written to the standard error channel. In CGI applications, this will usually end up in the web server error log.

“HTML” will embed error messages as HTML comments in the output.

“JS” will embed error messages as javascript snippets that create an alert box with the message.

The default is “STDERR” only. If you want to turn off all errors, use “NONE” or “0”.