The references for request.? are usually set in app_locals (for unique
requestors or to override global ones) or in app_globals (or app_server or
app_domain)...basically any top level application controller (app_ files)
that are called anytime there is a user request for a page.  I personally
set them in app_globals, but some are more appropriately set in app_server
and I even set them in app_domain since some of those values may change with
environment.

And yes, you are correct in how you build the index.cfm, though (and there
has been some confusion on this), you are no longer required to use the
app_layout and in your example below, app_layout would be doing much of the
"gluing" together of your header, body and footer...which is not really
necessary anymore since BodyContent already takes care of this for us.

Mike Craig
Its a Fusebox World

-----Original Message-----
From: Alan Walker [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 18, 2001 2:19 PM
To: Fusebox
Subject: Confusion wrapped around app_layout.cfm


Hello Everyone,

I'm starting to use CF_BODYCONTENT on a site I'm developing and I'm trying
to make sense of the app_layout.cfm file.  I looked at the example code from
fusebox.org (below)

<cfparam name="request.headerfile">
<cfparam name="request.footerfile">
<cfparam name="request.bodycontent">
<cfparam name="attributes.showbody" default="yes">
<cfif len(request.headerfile)>
        <cfinclude template="#request.headerfile#">
</cfif>
<cfif attributes.showbody>
        <cfoutput>#request.bodycontent#</cfoutput>
</cfif>
<cfif len(request.footerfile)>
        <cfinclude template="#request.footerfile#">
</cfif>

My question is, where do you actually create the file reference for the
#request.headerfile# and #request.footerfile#?  Is this the right place to
assign that variable?  Then on the actual index page, all you have is the
CF_BODYCONTENT tag wrapped around the CFSWITCH tag and then the
app_layout.cfm include.  Is that right?

Thanks for your help,

Alan Walker
PlanetAlan.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to