So how do you do the following in strict Fusebox style?

I have an app where to simplify matters for users they
only need enter a Search Term and hit Enter.  (I tried
making them select an option before they hit enter, but
did not feel it was user-friendly enuf.  BTW, this
kind of follows Creative Good's "Survival Strategy 6:
Improving Search" recommendation in their Dotcom
Survival Guide, which is a free download at this URL:
http://www.creativegood.com/survival, and an
interesting read.)

If the Search Term IS a Special Pre-Assigned One, then a
SQL lookup enables a jump to just that Special Result
Page (no action required by the user).  In addition to
the special results on that page, the page also contains
a link to Verity Search Results for the same Search Term.
(A somewhat messy alternative would be to display the
Verity Search Results below the Special Results.)

If the Search Term IS NOT a Special Pre-Assigned One,
the result page simply lists the Verity Search Results.

The current index.cfm is as follows:

<CFINCLUDE TEMPLATE="/#request.CFroot#/app_locals.cfm">
<CFINCLUDE TEMPLATE="/#request.CFroot#/qry_GetOrgIdFromKeyWord.cfm">

<CFIF GETID.RECORDCOUNT AND Attributes.KeyWord>

<CFINCLUDE TEMPLATE="/#request.CFroot#/KW/dsp_firstKW.cfm">
<CFINCLUDE TEMPLATE="/#request.CFroot#/dsp_BlueBar.cfm">
<CFINCLUDE TEMPLATE="/#request.CFroot#/KW/dsp_orgKW.cfm">

<CFELSE>

<CFINCLUDE TEMPLATE="/#request.CFroot#/qry_SearchHandL.cfm">
<CFINCLUDE TEMPLATE="/#request.CFroot#/SC/dsp_firstSC.cfm">
<CFINCLUDE TEMPLATE="/#request.CFroot#/dsp_heading.cfm">
<CFINCLUDE TEMPLATE="/#request.CFroot#/dsp_BlueBar.cfm">
<CFINCLUDE TEMPLATE="/#request.CFroot#/SC/dsp_SYPHeadings.cfm">

</CFIF>

best,  paul


At 12:25 PM 8/15/00 +0100, you wrote:
> >
> > Thanks for the response.  How are situations handled where you have a
> > query within a loop handled within Fusebox?
> >
> > For example:
> >
> > <CFLOOP INDEX="CountLoop" FROM=1 TO=10>
> >      <CFQUERY .....>
> >           SELECT * FROM Table
> >           WHERE ID = CountLoop
> >      </CFQUERY>
> >
> >      <CFOUTPUT>
> >           You are at record #ID#.
> >      </CFOUTPUT>
> > </CFLOOP>
> >
> > I don't see an easy way to abstract this functionality back to only
> > CFINCLUDEs at the index.cfm.
> >
>
>Kevin,
>
>I'm not sure why you would do this anyway.....  The code above would be 10
>hits on the database - you would be far better doing.....
>
><CFQUERY name="MyQuery" datasource="MyDSN">
>  SELECT * FROM Table
>  WHERE ID < 10
></CFQUERY>
>
><cfoutput query="MyQuery">
>#ID# - #currentrow#
></cfoutput>
>
>Also,  your code example from your first email...
> > <CFIF Attributes.UserName IS "Dave">
> >     <CFINCLUDE TEMPLATE="qry_Dave">
> > <CFELSE>
> >     <CFINCLUDE TEMPLATE="qry_NotDave">
> > </CFIF>
>
>Would it not be better to do away with this and write a file called
>qry_user.cfm (or whatever) which contains a query like this:
>         select * from table
>         where username = '#attributes.UserName#'
>
>Its not good practice to hard code a query for a variable piece of data as
>you have in the above <cfif> statement.
>
>Fusebox applications look more like this in your index.cfm:
>
><cfinclude template="app_locals.cfm">
><cfswitch expression=#attributes.fuseaction#>
><cfcase value="GetUser">
>         <Cfinclude template="qry_user.cfm">
>         <cfinclude template="dsp_user.cfm">
></cfcase>
><cfdefaultcase>
>         <Cfinclude template="qry_getuserdetail.cfm">
>         <cfinclude template="dsp_userlist.cfm">
></cfdefaultcase>
></cfswitch>
>
>Is this bring you any closer to understanding Kevin?
>
>Hope I've helped.
>
>Regards
>
>Stephen
>
>------------------------------------------------------------------------------
>Archives: http://www.mail-archive.com/[email protected]/
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to