> In one of my custom tags I need to turn on ENABLECFOUTPUTONLY 
> because the result of this custom tag will be going inside PRE 
> tags, so I can't have any extra white space come out of it. Now 
> the page that uses this tag quit working, becuase the 
> ENABLECFOUTPUTONLY is affecting the entire request. Doesn't it 
> make sense that it would only affect the custom tag? Shouldn't 
> that be a separate 'scope'? It is with variables, why does the 
> cfsetting carry across?
> 
> So anyway, I need to turn ENABLECFOUTPUTONLY back off at the end 
> of the custom tag, I guess. But what if (later on in development) 
> a page makes use of this tag, and that page already has 
> ENABLECFOUTPUTONLY set to on? Then the tag will turn it on again, 
> no problem there, but at the end of the tag it will set 
> ENABLECFOUTPUTONLY to off, totally screwing up the page that calls 
> it.
> 
> Is there a way to detect ENABLECFOUTPUTONLY, so I don't need to 
> flip it if I don't need to?

I don't think you have to worry about this. If I recall correctly,
ENABLECFOUTPUTONLY works like parentheses; you need one "NO" for each
preceding "YES" to actually turn it off. Here's what the CF Studio docs say
about it:

"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."

> I miss Perl...

Well, with enough psychiatric help, you'll get over this. 

Just kidding. Some of my best friends use Perl.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to