First of all CFMODULEs run in their own memory space, so they have no
implicit knowledge of what is going on in the calling template.  That means
it's pointless to surround a CFMODULE tag with CFOUTPUTs.  Secondly, your
confusion is well founded.  It sounds like a browser caching problem to me
since putting the CFSETTING tags inside the called template should work just
fine.  Clear your browser's cache and try again.  Good luck - this is an
age-old problem and has never been solved in fashion acceptable to all!

                                                    
Bryan Love ACP
Internet Application Developer
[EMAIL PROTECTED]
                                                    


-----Original Message-----
From: Francisco Montes; Spain on Line [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 9:24 AM
To: CF-Talk
Subject: Removing white space problem


Hi,

I´ve been trying to reduce the amount of white space that the CF server
produces by using the <CFSETTING ENABLECFOUTPUTONLY="YES"> at the beginning
and <CFSETTING ENABLECFOUTPUTONLY="NO"> and the end of templates. Everything
seems to work fine as only the code in between CFOUTPUT tags is displayed.

However if i call another file through a CFMODULE tag (also in between both
CFSETTING tags) like this:

<CFSETTING ENABLECFOUTPUTONLY="YES">

..... some code here...

    <CFOUPUT><CFMODULE TEMPLATE="AFile.cfm"></CFOUTPUT>

..... some more code here...

<CFSETTING ENABLECFOUTPUTONLY="NO"> 

..... the output of "AFile.cfm" DOES HAVE lots of white space. At this point
my conclusion would be that no matter if the cfmodule call is inside a
CFSETTING scope, all that white space won´t be removed. But... even when i
put CFSETTING at the begining and at the end within "AFile.cfm" i still get
uneeded white space!

And the last thing i tried that left me totally confused: if i call
"AFile.cfm" directly with a browser it works fine as all the white space is
supressed correctly!

What am i doing wrong? Has anybody found this problem before?

Francisco Montes
Web Developer
Spain on Line
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to