Not that it's a huge deal, but don't forget that cfmodule also requires 
a single file compilatation as opossed to two file compilations, as well ;)

~Simon

Simon Horwith
Chief Information Officer, AboutWeb
http://www.aboutweb.com
Member of Team Macromedia
Macromedia Certified Master Instructor
Editor-in-Chief, ColdFusion Developers Journal
Blog - http://www.horwith.com




Katz, Dov B (IT) wrote:

>CFModule encapsulates the layout nicer than 2 isolated CFINCLUDES...
>
>You have a single layout.cfm which detects if #thistag.executionmode# is
>"start" and shows the header or footer.   It makes for an easier read if
>the module is CF_TAGNAME'd..
>
>Example... You have layout.cfm, so you can do this:
>
><CF_LAYOUT>
> my page
></CF_LAYOUT>
>
>That's more elegant than cfinclude header, cfinclude footer, and allows
>you to pass in custom arguments since it's using cfmodule under the
>covers.
>
>That's my take on things
>
>-dov
>
>-----Original Message-----
>From: Michael Dinowitz [mailto:[EMAIL PROTECTED] 
>Sent: Tuesday, November 30, 2004 12:46 PM
>To: CF-Talk
>Subject: CFMODULE vs. CFINCLUDE
>
>I'm rewriting Raymond's Lighthouse Bugtracker (not my idea) and one
>piece bought up an old question I had. Is there any performance
>difference between a CFMODULE acting as a layout wrapper or 2 CFINCLUDE
>templates with layout?
>In the first case, your code is:
><cfmodule template="layout.cfm">
>Display stuff
></cfmodule>
>
>In the second  case you have:
><CFINCLUDE template="header">
>Display Stuff
><CFINCLUDE template="footer">
>
>Because of the nature of the CFMODULE, it's called twice and various
>variables are created in its process. The CFINCLUDE method uses 2
>CFINCLUDES, but there's nothing special about them. No extra variables,
>etc.
>
>Logic says that the CFINCLUDE method of template layout is more
>efficient, but I'd like to know what others think? 
>
>I'll ask the question about what people think of the pagecontext include
>vs.
>cfinclude another time. :)
>
>
>
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185710
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

Reply via email to