Hal,
I really like this. I've got one question though. Obviously you don't use
app_globals.cfm, <cf_bodycontent>, and app_layout.cfm in both the main
fusebox and the sub fusebox. So, do you use these in the main fusebox or in
each sub fusebox? I'm thinking in the main fusebox. Do you have any more
info you can give me for using this method? An example?
Is the following code correct?
<!------------------------------------- Main fusebox --->
<cfinclude template="app_globals.cfm">
<cf_bodycontent>
<cfparam name="attributes.fuseaction" default="">
<cfswitch expression="#ListFirst(attributes.fuseaction,".")#">
<cfcase value="members">
<cfinclude template="members/index.cfm">
</cfcase>
<cfcase value="store">
<cfinclude template="store/index.cfm">
</cfcase>
<cfdefaultcase>
<cfinclude template="blocks/dsp_homepage.cfm">
</cfdefaultcase>
</cfswitch>
</cf_bodycontent>
<cfinclude template="app_layout.cfm">
<!--------- Sub fusebox (without app_globals.cfm, <cf_bodycontent>, and
app_layout.cfm --->
<cfinclude template="app_locals.cfm">
<cfparam name="attributes.fuseaction" default="">
<cfswitch expression="#ListLast(attributes.fuseaction,".")#">
<cfcase value="signup">
<cfinclude template="blocks/dsp_signupform.cfm">
</cfcase>
<cfcase value="welcome">
<cfinclude template="blocks/dsp_welcome.cfm">
</cfcase>
<cfdefaultcase>
<cfinclude template="blocks/dsp_login.cfm">
</cfdefaultcase>
</cfswitch>
Thanks for your help,
Brad
-----Original Message-----
From: Hal Helms [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 09, 2000 5:39 PM
To: [EMAIL PROTECTED]
Subject: RE: sub-fuse
Here's what I do:
Each fusebox uses a fuseaction with the format xxx.someFuseaction, where xxx
is a unique identifier. For example, if you were working with a shopping
cart, you might have fuseactions like crt.emptyCart.
Each nested fusebox uses this to get the appropriate fuseaction.
<cfswitch expression = "#ListLast(attributes.fuseaction,'.')#">
Then the cfcase values are the fuseaction less the prefix. Example:
emptyCart.
The outer fusebox uses <cfswitch expression =
"#ListFirst(attributes.fuseaction,'.')#">
And checks for case values like this:
<cfcase value = "crt">
<cfinclude template = "ShoppingCart/index.cfm">
I find it works very nicely.
Hal
-----Original Message-----
From: Brad Roberts [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 09, 2000 8:14 AM
To: Fusebox List
Subject: sub-fuse
Anyone have more ideas on sub-fuseboxes? I'm in the middle of trying to
figure out the best way. It looks like using mappings is it, but I don't
think my host is going to set up a mapping (or two) for every site I create.
Any suggestions? Someone mentioned Hal's way, where can I find that?
Thanks,
Brad
----------------------------------------------------------------------------
--
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
----------------------------------------------------------------------------
--
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.