In my preceeding act_ file, I cflocate to a new fuseaction that includes the
query. I don't put any logic in the index.cfm itself, unless it just can't
be helped.
Something like this:
<cfcase value="fuseaction1">
<cfset Attributes.XFA.Location =
"index.cfm?fuseaction=fuseaction_to_run_query">
<cfinclude template="act_doSomething.cfm">
[.........]
</cfcase>
<cfcase value="fuseaction_to_run_query">
<cfset Attributes.XFA.Location = "index.cfm?fuseaction=fuseaction2">
<cfinclude template="qry_getStuff.cfm">
[.........]
</cfcase>
Todd Ashworth --
Certified ColdFusion Developer
Network Administrator
Saber Corporation
314 Oakland Ave.
Rock Hill, SC 29730
(803) 327-0137 [111]
----- Original Message -----
From: "Hal Helms" <[EMAIL PROTECTED]>
To: "Fusebox" <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 8:18 AM
Subject: Surveying the community
| Folks,
|
| Question on how you handle queries: Some people always include query files
| in other files, like this in actDoSomething.cfm:
|
| <cfinclude template="/Queries/aQuery.cfm">
|
| Others let the fusebox itself handle this, like this:
|
| <cfcase value="doSomething">
| <cfinclude template="actDoSomething.cfm">
| <cfinclude template="aQuery.cfm">
| </cfcase>
|
| My question is this: if you use the second method, how do you handle the
| situation where you would only want to call "aQuery.cfm" IF a variable in
| "actDoSomething.cfm" was set to true? Do you do it in the fusebox, like
| this:
|
| <cfcase value="doSomething">
| <cfinclude template="actDoSomething.cfm">
| <cfif includeQuery>
| <cfinclude template="aQuery.cfm">
| </cfif>
| </cfcase>
|
| Or do you do something else? I'm just trying to see how different
developers
| handle this situation.
| Hal Helms
|
| Team Allaire
|
| [ See www.halhelms.com for info on training classes ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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