Forgetting to cfimport tag libraries?

4 views
Skip to first unread message

Rob Rohan

unread,
Nov 14, 2008, 1:17:57 AM11/14/08
to farcry-dev
Being the über noob I am with FarCry, I tend to forget import the taglibs for things quite often.  Depending on how much coffee I've had, or how late in the day it is, it can take quite a while before I figure out why my grid:col doesn't seem to be working correctly.

The main problem is that there is no way to throw an error if the cfimport tag is missing because <skin:buildLink> is valid XML and if you forget the import:

<cfimport taglib="/farcry/core/tags/webskin" prefix="skin" />

CF never processes the tag so there is no way to catch or throw an error on the server side... 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.

Sean Coyne

unread,
Nov 14, 2008, 8:01:50 AM11/14/08
to farcry-dev
very nice. very helpful

Michael Sharman

unread,
Nov 15, 2008, 3:52:00 AM11/15/08
to farcry-dev
That's a brilliantly simple solution Rob.

I love it :)
Reply all
Reply to author
Forward
0 new messages