Lucee Tag Reference
<cfprocessingdirective>
Sets compiler directives that affect the entire template. Unlike most CFML tags, cfprocessingdirective is processed at compile time and must be placed at the root level of your template.
Body
This tag may have a body.
Example
<cfprocessingdirective [executionlog=boolean] [pageencoding=string] [preservecase=boolean] [suppresswhitespace=boolean]> [</cfprocessingdirective>]
This tag is also supported within cfscript
<cfscript> processingdirective [executionlog=boolean] [pageencoding=string] [preservecase=boolean] [suppresswhitespace=boolean] { [...] } </cfscript>
Attributes
The attributes for this tag are fixed. Except for the following attributes no other attributes are allowed.
| Name | Type | Required | Description |
|---|---|---|---|
| executionlog | boolean | No | Controls whether execution time logging is enabled for this template. When set to true, Lucee will log performance metrics for this template, which can be valuable for debugging and optimization. Example: executionLog="true" |
| pageencoding | string | No | Specifies the character encoding used for the current template file. This must be a string literal corresponding to a valid character encoding (not a dynamic expression). Common values: UTF-8 (Unicode, recommended for most applications), ISO-8859-1 (Latin-1), Windows-1252 (Windows Western European). Example: pageEncoding="UTF-8" |
| preservecase | boolean | No | Controls how variable keys defined using dot notation are handled: When preserveCase="false" (default): All struct keys defined with dot notation are converted to uppercase. Example: sct.dotNotation becomes key "DOTNOTATION" while sct["bracketNotation"] remains "bracketNotation" When preserveCase="true": Struct keys defined with dot notation maintain their original case. Example: sct.dotNotation remains key "dotNotation" and sct["bracketNotation"] remains "bracketNotation" This setting affects all dot notation usage throughout the template. |
| suppresswhitespace | boolean | No | When set to true, removes unnecessary whitespace from the generated HTML output, reducing the file size and potentially improving page load times. This includes spaces, tabs, and line breaks between HTML elements. Example: suppressWhiteSpace="true" |