>I have a page where I want to conditionally include specific code blocks 
>which exist in other pages.
>
>What is more efficient, CFMODULE or CFINCLUDE?

One thing that wasn't mentioned in some of the other replies I saw to this 
thread was that CFMODULE and cfinclude are actually slightly different 
beasts.

CFMODULE is the same thing as invoking a custom tag. The benefit of using 
this method over a custom tag stored in the CustomTags folder in the CF root 
is that it resolves name conflicts among custom tags by letting you specify 
where you want to store your tags (pre-CF 5 when you couldn't specify tag 
dirs in the CF admin, this was very useful). With CFMODULE , you supply the 
path to the custom tag template, whereas with the CustomTags directory in 
the CF root, you simply call the template and CF invokes the first instance 
of that template it finds (or the last, I always get that confused!). 
CFMODULE also creates it variables in its own scope, a la custom tags.

CFINCLUDE runs in the same scope as the page request -- variables in the 
cfinclude can be clobbered or can clobber other variables with the same 
scope/name.

So yes, the other responses were correct in that CFINCLUDE is the more 
efficient method. But it also depends on what you're trying to accomplish.

Hope this helps,
Dave.



______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to