As I understand it....

CFEXIT is used to end processing of a "sub" page but continue with the
calling page.  Yes, it can end processing outright, but that's kind of a
bonus.  If you are using the tag in a custom tag, you can end processing of
the CT and return to the calling page seamlessly.

Now, in your case, using CFEXIT in an include file sounds wrong.  I'm not
perfect, so could be off on this, but I beleive the default method of CFEXIT
is the EXITTAG option.  Your include files are not custom tags, but become
part of the parent template before being processed.  So, the ExitTag option
will end processing of the current template, and return control to the
calling template.  There is no calling template in this case, so processing
halts.  Therefore, it seems reasonable that you end up with partial HTTP
headers and such, depending on where you place the EXIT tag.

If you simply want to halt processing, use the CFABORT tag.  But to
conditionally process an include file, then you either need the CFINCLUDE
command within an IF block, or the contents of the include file need to be
contained in an IF block. (the if blocks for your particular logic).

HTH

Shawn Grover

-----Original Message-----
From: Gyrus [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 27, 2002 4:31 PM
To: CF-Talk
Subject: CFEXIT problems


Just got to wondering if some problems I'm having are something to do
with using CFEXIT. I've always been slightly confused by the METHOD
attribute.

I've often wanted to, and do, use it in a file that's being CFINCLUDEd.
I just leave the METHOD off and it seems to work. BUT!!

1. Carefully reading the documentation for it seems to suggest that it
should only be used in custom tags. Does it matter to CFEXIT if a file
is included, not called as a custom tag? How should it be used properly
to exit an include? If not, how can you return to the 'parent' template
of an include at a certain point in processing the include?

2. A presentation I found using Google
(http://www.cfconf.org/2001CF_Odyssey/talks/CF2001Hosting.ppt) says
"Avoid CFEXIT as there is no guarantee that it will ever resolve." What
does this mean? How do you exit a template without it?

Any light on these things much appreciated!

- Gyrus

~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [EMAIL PROTECTED]
work: http://www.tengai.co.uk
play: http://www.norlonto.net
- PGP key available
~~~~~~~~~~~~~~~~~~~~~~~~~~~~


______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to