Ask a Jedi: Can you run a tag in "end" mode inside a CFIF?

Kyle Hayes pinged me with an interesting question today. He wanted to run a custom tag in "end" mode - but inside a CFIF block:

<cfif gt 50> </cf_sometag> </cfif>

This of course won't work - it will throw an error. Luckily there is a way around it, and I discuss it here in this blog entry from 2004:

Manually Setting Execution Mode

p.s. This entry is basically a pointer to a way old blog post of mine. I figured since the question came up it was ok to repeat it. Good idea? Bad idea? Waste of space?

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA