Well there is obviously good and bad to doing it either way. The worse thing so far for me is that some pages I dont want the header and footer or like when using a text editor it tries to load the header and footer into the textarea. But both of those are easily solved by chucking an app.cfc/cfm page in their directory and not having the headers/footers there. I'm sure if i was building a "nasa" site I wouldn't do it this way but small sites I see no harm and if you do decide to do the rss/xml thingy, it's easy enough to change.
By the way Matthew, you totally rock :) You always offer good advise! ~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: Wednesday, November 09, 2005 2:33 PM To: CF-Talk <[email protected]> Subject: RE: cfinclude from a template, or onRequestStart? > I don't see why you couldn't or wouldn't Well you certainly could, although I wouldn't. It is the kind of thing that may not be a problem now but could be a hassle later. As you describe in your first paragraph below, it's a hassle when suddenly you *don't* want that template wrapped around your content for a new page. I would generally only put things I *always* wanted in application.cfc/cfm. I couldn't guarantee that anything I was displaying would be *always* wanted, as I may want a different template for a popup page, or I may be delivering a different type of content such as XML. -----Original Message----- From: dave [mailto:[EMAIL PROTECTED] Sent: Wednesday, 9 November 2005 11:47 p.m. To: CF-Talk Subject: RE: cfinclude from a template, or onRequestStart? 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: returntype="void"> " 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" Sent: Tuesday, November 08, 2005 9:12 PM To: CF-Talk 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.... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223754 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

