Jim,

<cfif NOT IsDefined("ThisTag.ExecutionMode")>
  bounce them out somehow
<CFELSE>
 run the tag
</CFIF>

That, or any other variation you care to use that tests for
ThisTag.ExecutionMode, will do the trick.

Cheers,

-----------------------------------------
Matt Robertson      [EMAIL PROTECTED]
MSB Designs, Inc. http://mysecretbase.com
-----------------------------------------

----- Original Message -----
From: "Jim McAtee" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, November 30, 2001 4:05 PM
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

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
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