those kind of questions have popped up for me recently - searching for
instance, when a search form offers a text search or search by id or
something, then there's a condition to decide which query to use. I
actualyl prefer to put that if statement in the fusebox itself. I like
being able to see EVERYTHING that's being included by looking at the
fusebox. So far the only time I've ever had to include a query within
another cfm is inside a custom tag.
Toby Tremayne
Code Poet and Zen Master of the Heavy Sleep
Show Ads Interactive
359 Plummer St
Port Melbourne
VIC 3207
P +61 3 9245 1247
F +61 3 9646 9814
ICQ UIN 13107913
-----Original Message-----
From: Hal Helms [mailto:[EMAIL PROTECTED]]
Sent: Monday, 9 April 2001 10:19 PM
To: Fusebox
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