Stephen,

Use the ThisTag.ExecutionMode variable to check whether you are at the
start or end of a custom tag pair.
E.g. 

<cfif ThisTag.ExecutionMode IS "start">
        Some code here.....
<cfelseif ThisTag.ExecutionMode IS "end">
        Other Code here.....
</cfif>

If it's unimportant in your case whether you are at the start or end tag
I would do something along the following lines:

<cfif ThisTag.ExecutionMode IS "end">
        Your custom tag code here.....
</cfif>

Hope this helps,

Ryan Edgar
Certified Coldfusion 5.0 Developer


-----Original Message-----
From: Stephen Adams [mailto:[EMAIL PROTECTED]]
Sent: 18 February 2002 16:23
To: CF-Talk
Subject: cfmail within a custom tag being run twice


Hi everyone,

I am having a problem with a custom tag I have written that sends out an
email every time an error occurrs.  The problem is that I always get two
emails sent for one error. I am using a close tag to call the custom
tag, other than that I can't see why the tag would be run twice.

Does anyone have ideas why this happens ?

Stephen

______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
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