Ben,

I'd have to ponder your last question a little.

But as to CFDEFAULTCASE, I wouldn't bother trying to redirect it to your
preferred default fuseaction.  Just use CFDEFAULTCASE as a last-resort
error-handling case.  I make a call to my standard error-handling tag. which
logs the error, emails me if necessary, etc, because something WRONG has
happened.

This last-resort case only gets used if a non-existent fuseaction is called,
because you are using CFPARAM to explicitly set the fuseaction if no
fuseaction at all has been specified.

That doesn't read too well, but I hope it makes sense.

See you later,
LeeBB.



-----Original Message-----
From: Ben Koshy [mailto:[EMAIL PROTECTED]]
Sent: Monday, 14 May 2001 9:40
To: Fusebox
Subject: A few more Questions (was RE: Calling Fuses without Layout)


Thanks Lee,

Yes, I'm using CFBODYCONTENT.  I don't need to see the code, the
recommendation was enough...so I pass a parameter that nulls the
request.footerfile and request.headfile and it works like a charm.  Are
there any articles/information on how to handle complex layout/objects in
Fusebox?  I'm curious if people are using a similar methods as myself.

In Addtion, I'll change my <cfdefaultfuseaction> to a CFMODULE that just
recalls the default fuse to avoid the duplication/update problems if I ever
change the default fuse, I always had to update the cfdefaultfuseaciton as
well.  Annoying at best.

Is there a rule as to where you using the request. scope to define
variables?  I assume in the local circuits you use attributes scope and
request is only used for global variables?

The last question is more of a formatting question.  I am now making the
rightcolumn content variable declarations in the index.cfm inside the
individual fuses.  Should I be moving this to the dsp_ file?  I just found
it hard to debug the rightcolumn.  I define a default rightsidecolumn
content in the app_locals.cfm, but when I want to override it I just
re-declare right in the fuse.  I'm not sure to what extent you should be
avoiding putting actual code/content in the fuse itself.  Comments would be
appreciated.

Here's my /circuitapp/index.cfm
===========================================================
<cfinclude template="app_locals.cfm">

<CFPARAM name="attributes.fuseaction" default="welcome">

<cf_bodycontent>
        <cfswitch expression="#attributes.fuseaction#">
                <cfcase value="welcome">
                        <CFINCLUDE template="qry_fanartseries.cfm">
                        <CFINCLUDE template="dsp_listseries.cfm">
                </cfcase>
                <cfcase value="showsearchbox">
                        <CFINCLUDE template="act_search.cfm">
                        <CFINCLUDE template="dsp_searchbox.cfm">
                </cfcase>
                <cfcase value="viewimage">
                        <CFSET request.rightcolumn = 0>
                        <CFINCLUDE template="qry_getfanart.cfm">
                        <CFINCLUDE template="act_processvote.cfm">
                        <CFINCLUDE template="dsp_viewimage.cfm">
                </cfcase>
                <cfcase value="browsegallery">
                        <CFSET request.rightcolumncontent =
"fanart|showsearchbox,fanart|showtopten">
                        <CFINCLUDE template="act_search.cfm">
                        <CFINCLUDE template="dsp_browsegallery.cfm">
                </cfcase>
                <cfcase value="showcasefanart">
                        <CFINCLUDE template="qry_showcasefanart.cfm">
                        <CFINCLUDE template="dsp_showcasefanart.cfm">
                </cfcase>
                <cfcase value="showtopten">
                        <CFINCLUDE template="qry_topten.cfm">
                        <CFINCLUDE template="dsp_topten.cfm">
                </cfcase>
                <cfcase value="submitform">
                        <CFINCLUDE template="qry_series.cfm">
                        <CFINCLUDE template="act_submitform.cfm">
                        <CFINCLUDE template="dsp_submitform.cfm">
                </cfcase>
                <cfcase value="compileratings">
                        <CFINCLUDE template="act_compileratings.cfm">
                </cfcase>
                <cfdefaultcase>
                        <CFINCLUDE template="qry_fanartseries.cfm">
                        <CFINCLUDE template="dsp_listseries.cfm">
                </cfdefaultcase>
        </cfswitch>
</cf_bodycontent>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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