Yet Another Galleon ColdFusion Forums Update, and ColdFusion Tip

I’ve updated Galleon ColdFusion Forums again, this time to fix an issue with BlueDragon. Well, not an issue per se, but BlueDragon doesn’t support CFCHART. I only used it in the admin, so BD users could simply ignore it, but I knew I’d get a lot of bug reports so I simply fixed it.

Curious to know how I fixed it? I used a technique I used a long time ago when working on the Spectra product. I had a case where for one version of ColdFusion I needed to call some tag, let’s say <cfray> and for some higher version of CF, use <cf_rayreplacement>, since the <cfray> was removed.

Well, you can’t just do this:

<cfif version gte 5>
<cf_rayreplacement>
<cfelse>
<cfray>
</cfif>

If you do this, ColdFusion (and BlueDragon) notice that you have an invalid tag in the source. Even if never gets called, it won’t compile. So to get around this, I simply moved the code to an include:

<cfif version gte 5>
<cf_rayreplacement>
<cfelse>
<cfinclude the bad tag>
</cfif>
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 https://www.raymondcamden.com

Comments