Use isDefined("thistag.executionmode") I believe this variable only exists
if the template is bieng run as a custom tag.Also cgi.script_name give you the name of the template a page is included in. if it is different to the name of the included file (check from within) then it must be an include. HTH -----Original Message----- From: Jim McAtee [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 01, 2001 12:06 AM To: CF-Talk Subject: Restricting execution of CF tag If I've got CF tag with, let's say, a file name of "header.cfm", is there a way within the tag to test if it's been called as a CF tag? I'd like to keep the template from being executed if it's ever designated in a url and to simply <cfabort> if it wasn't used as a tag. Similarly, I usually name cfinclude'd files with a .cfm extension. Is there a means of testing to see if the current template has been cfincluded within another? Once again, just to keep the included file from being executed stand-alone. Thanks, Jim ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.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

