User Guide

Chapter 1: ColdFusion Tags 199
CFSETTING
CFSETTING is used to control various aspects of page processing, such as controlling
the output of HTML code in your pages. One benefit of this option is managing
whitespace that can occur in output pages that are served by ColdFusion.
Syntax <CFSETTING ENABLECFOUTPUTONLY="Yes/No"
SHOWDEBUGOUTPUT="Yes/No"
CATCHEXCEPTIONBYPATTERN="Yes/No"
>
ENABLECFOUTPUTONLY
Required. Yes or No. When set to Yes, CFSETTING blocks output of all HTML that
resides outside CFOUTPUT tags.
SHOWDEBUGOUTPUT
Optional. Yes or No. When set to No, SHOWDEBUGOUTPUT suppresses
debugging information that would otherwise display at the end of the generated
page. Default is Yes.
CATCHEXCEPTIONSBYPATTERN
Optional. Yes or No. When set to Yes, it overrides the
structured exception
handling introduced in 4.5.
Default is No.
Note Structured exception handling introduces a subtle upwards
incompatibility. In 4.0.x, an exception was handled by the first CFCATCH
block that could handle that type of exception. In 4.5, the structured
exception manager searches for the best-fit CFCATCH handler.
Usage When nesting CFSETTING tags, you must match each ENABLECFOUTPUTONLY=“Yes
" setting with an ENABLECFOUTPUTONLY=“No " setting for ordinary HTML text to be
visible to a user. For example, if you have five ENABLECFOUTPUTONLY=“Yes "
statements, you must also have five corresponding ENABLECFOUTPUTONLY=“No "
statements for HTML text to be displayed again.
If at any point the output of plain HTML is enabled (no matter how many
ENABLECFOUTPUTONLY=“No " statements have been processed) the first
ENABLECFOUTPUTONLY=“YES " statement will block output.
Example ...
<CFSETTING ENABLECFOUTPUTONLY="Yes">
This text is not shown
<CFSETTING ENABLECFOUTPUTONLY="No">
<P>This text is shown
<CFSETTING ENABLECFOUTPUTONLY="Yes">
<CFOUTPUT>
<P>Text within CFOUTPUT is always shown
</CFOUTPUT>
<CFSETTING ENABLECFOUTPUTONLY="No">