I do this:
        <cfcase value="doSomething">
          <cfinclude template="actDoSomething.cfm">
          <cfinclude template="aQuery.cfm">
        </cfcase>

and then put any conditional logic inside the "aQuery.cfm" file like this:
        <cfif doSomething>
                select da,de,do from ........
        </cfif>

Keeps my index.cfm readable, yet doesn't hide the aQuery.cfm include.

Mike Pellicciotti
> -----Original Message-----
> From: Hal Helms [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, April 09, 2001 8:19 AM
> 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

Reply via email to