Appendix B. Configuration directives

Table of Contents

The configuration

A complete list of configuration directives:

The configuration

root

(string) Defines the directory, where the templates are located. The directory has to be be readable.

compile

(string) Defines the directory, where the compiled templates are stored. The directory has to be writeable.

cache

(string) Defines the directory, where the output cache files are stored. The directory has to be writeable. If not set, the cache is unavailable.

plugins

(string) Defines the directory, where the plugins are stored. The directory has to be writeable in order to store them plugin loader cache data. If not set, the plugins are not loaded. Optionally, an array of plugin directories can be specified. OPT will load the plugins in all of them then.

gzipCompression

(boolean) Is the GZip compression enabled? Warning: if you enable this option, be sure that you DO NOT send any HTML code (or even spaces) outside the Open Power Template engine. Otherwise, you will see some weird characters instead of your website. Especially check, if the script does not send anything before the first call of the optClass::parse() method, which turns on the compression.

charset

(string) Defines the charset used by the generated documents. Must be set before calling optClass::httpHeaders() method.

alwaysRebuild

(boolean) The templates are always recompiled, even if there is no need. Use only for debug purposes.

showWarnings

(boolean) Set to "true" in order to display OPT warnings.

debugConsole

(boolean) Set to "true" in order to enable debug console. It is a pop-up window, which contains some useful information about the template engine and the templates (including execution time).

performance

(boolean) Set to true, if your web application is ready and you are sure every file is on its place. The directive speeds up the template execution very much by disabling template existence checking.

xmlsyntaxMode

(boolean) Set to "true" in order to enable the XML Syntax Mode.

strictSyntax

(boolean) Set to "true" in order to force the instructions to use OPT native parameter parser. If the XML Syntax Mode is enabled, the strict syntax is activated automatically.

entities

(boolean) Allows OPT to parse XHTML entities in the template tags and blocks. If the XML Syntax Mode is enabled, the entities are activated automatically.

sectionStructure

(int) Defines the default section data array format. In OPT_SECTION_MULTI (default) all the sections are kept in separate arrays. In OPT_SECTION_SINGLE the subsections are kept in the upper-level section array.

sectionDynamic

(string) Specifies, how the dynamic sections are handled. OPT_SECTION_COMPILE (default) - the support code is compiled in the templates only for dynamic sections. This does not slow down the traditional sections, but requires not to change the section state once the templates have been compiled. OPT_SECTION_RUNTIME makes you can use the dynamic section where- and whenever you want. However, the traditional sections are a bit slower, because there is also a code that checks, whether the section is dynamic or not. Note that neither of the possibilities requires the template syntax to change.

parseintDecPoint

(string) The decimal point character for the parseInt function.

parseintDecimals

(int) The number of decimals for the parseInt function.

parseintThousands

(string) The thousand separator for the parseInt function.