cfsetting

Description

Controls various aspects of page processing, such as the output of HTML code in pages. One benefit of this option is managing whitespace that can occur in output pages served by ColdFusion.

Category

Page processing tags

Syntax


<cfsetting enableCFoutputOnly = "Yes" or "No" 

  showDebugOutput = "Yes" or "No" 

  catchExceptionsByPattern = "Yes" or "No"> 

See also

cfcache, cfflush, cfheader, cfhtmlhead, cfinclude, cfsilent

Attributes

Attribute
Description
enableCFoutputOnly
Required. Yes or No. When set to Yes, cfsetting blocks output of 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. If Yes, it overrides the structured exception handling introduced in ColdFusion Server 4.5. Default is No.


Note

Structured exception handling introduces a subtle upward incompatibility. In ColdFusion 4.0.x, an exception was handled by the first cfcatch block that could handle that type of exception. Since ColdFusion 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 blocks 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">

<cfoutput>

  <P>Text within cfoutput is always shown

</cfoutput>  



</body>

</html>    



Banner.Novgorod.Ru