He's not saying to but the actual html in the app.cfc file he's saying put the 
include. And I don't see why you couldn't or wouldn't. I'm doing it on a 
current site and other than a few hair pulls it works great. The main problem 
is that if you have a page you don't want it on then you got a problem. I have 
heard a few ppl say it's not a good idea but they dont explain why not?????

here's a quote out of one of the 2 tuts I have read on application.cfc

" onRequestEnd 

This function is called at the end of a page request after all other ColdFusion 
code has executed. If you have application specific logic that should only be 
run at the end of your page, this is the place to put it. The following example 
simply outputs a footer by including the footer.cfm file:  <cffunction 
name="onRequestEnd" output="Yes" returntype="void">
   <cfargument name="targetPage" type="String" required="Yes" />
   <cfinclude template="footer.cfm" />
 </cffunction> "

So when when ppl say its bad then WHY is it bad, it seems to run just as good 
as any other method.

~Dave the disruptor~
"Some people just don't appreciate how difficult it is to dispense wisdom and 
abuse at the same time." 

----------------------------------------
From: "Matthew Walker" <[EMAIL PROTECTED]>
Sent: Tuesday, November 08, 2005 9:12 PM
To: CF-Talk <[email protected]>
Subject: RE: cfinclude from a template, or onRequestStart? 

Personally, I wouldn't put any display elements in application.cfc but
rather use it for app setup purposes (defining global variables,
initialising shopping carts, etc). If you wanted to have a different
page template on a page it might be a big hassle -- or one day you may
want a page that delivers RSS or CSV or something else. Depending on the
way your site is structured, you may find custom tag pairs are a nice
way of wrapping templates around your pages....

 ...
 ...
 ...

-----Original Message-----
From: Will Tomlinson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 9 November 2005 2:46 p.m.
To: CF-Talk
Subject: cfinclude from a template, or onRequestStart?

I usually assemble my pages with a cfinclude header, menu, footer, etc. 
But I figured it might be better to include the header.cfm in
onRequestStart, and footer.cfm in onRequestEnd to keep from spreading
includes all over the place. 

This way they'd all be in one spot. Am I thinking right??

Thanks,
Will



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223661
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to