View comments | RSS feed
Contents > CFML Reference > ColdFusion Tags > cfsilent PreviousNext

cfsilent

Suppresses output produced by CFML within a tag's scope.

Data output tags, Page processing tags

<cfsilent>
...
</cfsilent>

cfcache, cfflush, cfheader, cfhtmlhead, cfinclude, cfsetting

This tag requires an end tag.

<h3>cfsilent</h3>

<cfsilent>
  <cfset a = 100>
  <cfset b = 99>
  <cfset c = b-a>
  <cfoutput>Inside cfsilent block<br>
  b-a = #c#</cfoutput><br>
</cfsilent>

<p>Even information within cfoutput tags does not display within a 
cfsilent block.<br>
<cfoutput>
    b-a = #c#
</cfoutput>
</p>

Contents > CFML Reference > ColdFusion Tags > cfsilent PreviousNext

ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.

Comments


mindtrap said on Feb 1, 2005 at 9:00 AM :
This tag is amazing at increasing performance in your CFML code. But it doesn't work with CFTRY if you wrap it around the CFTRY tag. I haven't tried it the other way yet or with cfscript's try control statement.
Tacs said on Jul 20, 2005 at 1:22 PM :
The documentation on EVERY Coldfusion tag needs to display what the output is, the code also needs to be color-coded. Just so everybody knows, the output of the code is as follows:
---------------------
<h3>cfsilent</h3>



<p>Even information within cfoutput tags does not display within a
cfsilent block.<br>

b-a = -1

</p>
---------------------
None of the line breaks are created from the <cfset> tags, because of this, i suggest always using this code to reduce extra linebreaks that are uneeded.

The documentation should also provide a link to the function that eliminates all line breaks, except those within a CFOUTPUT tag. that way you can <cfsilent> all of your code, and the only code that is output is the code within the output tag. Just like PHP works with the <?PHP ... ?>, only text in the echo Echo 'my variable: $var'; gets output.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pc7.htm