Forgot to Import Your ColdFusion Tag Libraries?
I’ve been bitten by the “forgetting to add
The reason is of course that the syntax to import custom tags is perfectly valid XML which is ignored by ColdFusion server because you forgot to add
From Rob’s post on the farcry-dev mailing list:
however, since the <skin:build> type tags will make it all the way to the browser, we can style the tag in the browser to alert the problem.
I threw together a quick CSS file that you can include into your project style sheet that will draw attention to the error. Just add this to your site style sheet:
Or download the css file and put it where you want. That will style any FarCry taglib with block, red so you can spot the mistake right off.
While this tip is fantastic and easily flexible for use in any ColdFusion project, keep in mind that in its current state it will only be of use for FarCry developers.
Also note that the custom tag syntax (e.g. <skin:buildlink>) will only make its way to the browser (as part of the html source to be parsed by the css) if it’s inside
Here is a screen shot of the css in action, as you can see it’s hard to miss your mistake!
Many thanks to Rob for the tip, here is the link to his css.