> 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!!
The default METHOD attribute value is EXITTAG, which is sufficient for most uses. That method simply stops processing in the current script. If that script is a custom tag, processing will resume in the calling page at the appropriate point. The other METHOD values are used when you have nested subtags, and you want to process those subtags, but want to cancel processing of the base tag itself, to slightly oversimplify a bit. > 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? It's my understanding that, if you use CFEXIT in anything other than a custom tag, it will do the same thing as CFABORT, which stops processing for the entire request, whether it's used in a custom tag or any other script. I don't think it's possible to do what you're trying to do with it. > 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? I don't really know what that means, and in some cases, CFEXIT is the appropriate tag to use, so I wouldn't recommend just not using it at all. If you want to stop the processing of a custom tag and return processing to the calling page, CFEXIT is the tag for you. On the other hand, I wouldn't recommend using it within a script unless that script will be called only as a custom tag; if that's what the presentation means, then I'd agree. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.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

