> And the way around to prevent it from executing twice is to: > > <cfif thistag.ExecutionMode EQ "End"> > ... your code here > </cfif> > > within the customTag.
Yes, that functionality is fully described in the CF documentation, I'm sure, and covered in detail in the "Advanced ColdFusion Development" course from MM. You've got all sorts of variables available within the execution of a custom tag that you can use to affect what it does. Very often, when you write custom tags, you do want them to execute twice if they have an opening and a closing tag reference in the calling page, so you might write something like this: <cfif ThisTag.ExecutionMode is "start"> .. do the startup things ... <cfelse> .. do the ending things ... </cfif> You might, within the startup code, want to ensure that there will be an end tag: <cfif ThisTag.ExecutionMode is "start"> <cfif not ThisTag.HasEndTag> <cfthrow type="mycustomtagname.myerrortypename" message="End tag required!" errorcode="somenumberhere"> </cfif> ... <cfelse> ... However, my point was simply that blindly following XML syntax for CFML may have unintended consequences. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ______________________________________________________________________ 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/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists