On Sun, 12 Dec 2004 21:33:17 -0800, Barney Boisvert <[EMAIL PROTECTED]> wrote: > the 'taglib' attribute to CFIMPORT is a directory. You then reference > the files in the directory using the prefix. So if you do this: > > <cfimport prefix="name" taglib="path/to/my/custom/tags" /> > > then you can call the custom tag named "mytag.cfm" inside the > "path/to/my/custom/tags" directory like this: > > <name:mytag ... /> > > CFIMPORT is nothing more than an alternate way to call custom tags, > with much greater specificity than using custom tag paths from the > administrator. it also lets you call JSP custom tags, but that's a > bit of a different topic. >
One small point of clarification on this statement. While cfimport is an alternate way of calling custom tags, it should be noted that cfimport is a *compile-time* directive, and, as such, can offer performance improvements to your application (yes, it's minimal, but still). The one drawback is that you can't have a variable name in the cfimport taglib attribute because CF needs to know up front what the value is. The cf_* and cfmodule tags do run-time lookups of the requested tag, which allow you to store the directory path (if using cfmodule) in an application variable and use that variable as the path to the tag. Further, if you use cfimport, the directive must be directly on the page that you are calling that particular tag (as opposed to cfinclude-ing a page that makes a reference to the custom tag). Regards, Dave. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187393 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54