I have no idea what you mean by a "blocks" subdirectory, but then again its
been awhile since I read the docs.

However, the way I do it is I have my main index page.  On that page is
app_globals(if its in the parent directory) or app_locals (if its in a child
directory.) and a CFSWITCH.  On the app_globals page, I call
cf_formurl2attributes tag and set any global parameters (like
attributes.dsn) using CFPARAM.  On app_locals, I have an include pathed to
app_globals and any local parameters (like attributes.SteveNelsonsCreditCard
for the default payment creditcard).  Then, the switch is set up like this

<cfswitch expression="#attributes.fuseaction#">
 <cfcase value="forum,forumtopics,forumpostadd,forumpost,forummessage"
delimiters=",">
 <cfset title = "Forum">
  <cf_act_htmltags>
  <cfinclude template="forum/index.cfm">
  </cf_act_htmltags>
 </cfcase>
 <cfdefaultcase>
  <cf_act_htmltags>
  <cfinclude template="dsp_home.cfm">
  </cf_act_htmltags>
 </cfdefaultcase>
</cfswitch>

or framed like this

 <CFCASE VALUE="navside">
  <cf_act_htmltags>
   <cfinclude template="dsp_nav_side.cfm">
  </cf_act_htmltags>
 </CFCASE>
 <CFCASE VALUE="navglobal">
  <cf_act_htmltags>
   <cfinclude template="dsp_nav_global.cfm">
  </cf_act_htmltags>
 </CFCASE>
 <CFCASE VALUE="splash">
  <cf_act_htmltags>
   <cfinclude template="dsp_admin_login.cfm">
  </cf_act_htmltags>
 </CFCASE>
 <CFCASE VALUE="someotherfusaction">
  <cf_act_htmltags>
   <cfinclude template="dsp_somepage.cfm">
  </cf_act_htmltags>
 </CFCASE>
 <CFDEFAULTCASE>
  <cf_act_htmltags_frames>
   <frameset  rows="137,*" border="0" frameborder="no" framespacing="0">
       <frame name="header" src="index.cfm?fuseaction=navglobal"
marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>
       <frameset  cols="150,*">
           <frame name="nav" src="index.cfm?fuseaction=navside"
marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>
           <frame name="main" src="index.cfm?fuseaction=splash"
marginwidth="2" marginheight="2" scrolling="auto" frameborder="0" noresize>
       </frameset>
   </frameset>
  </cf_act_htmltags_frames>
 </CFDEFAULTCASE>

Note in a framed enviroment once you have your frame set the rest is just
calling fusactions and targeting your splash page or whatever frame name you
want the code to appear in..

So basically, my directories are set up by application and my main index.cfm
paths to those child apps using a comma delimited list of fuseactions that
go to a specific app.

If you are wondering what <cf_act_htmltags> is, its just a tag I use to put
all my opening and closing html tags including javascript and CSS stuff
because I hate to type.

In my opinion, the best way to understand Fusebox is to download the Fusebox
Specs zip file.  Then look at the code as you read the docs.  The docs
themselves are a fusebox app.

I suppose you could put all your queries in a queries folder for each
subdirectory ect, but I don't but that much effort into my directory
structure.

Also, any security for the main directory or child directories I put on that
that directory's application.cfm

Hope this helps

----- Original Message -----
From: "John Allred" <[EMAIL PROTECTED]>
To: "Fusebox" <[EMAIL PROTECTED]>
Sent: Friday, July 28, 2000 10:30 AM
Subject: Help getting started


> Sorry if this a duplicate (mail server errors)
>
> All of the info I've read on fusebox so far (sparse) doesn't give me the
> overview I need to understand how things fit together. Maybe someone
> could give me a thumbnail sketch of the file and directory structure.
> With limited understanding, I'd rather not do things I'd have to fix or
> unlearn later.
>
> Right now I have a subdirectory (not the server root) with a \blocks
> subdirectory and a \queries subdirectory. I have an app_globals.cfm in
> the root, according to Steve's "Application Files" section of his online
> specification. I have formURL2attributes.cfm in the \cfusion\customtags\
> directory.
>
> Looks like:
>         \cf_project\
>                 app_globals.cfm
>                 \blocks\
>                 \queries\
>                 \phone_directory\
>                 \course_catalog\
>                 \employees\
>
> Now, I'm ready to go, but what confuses me is where I store the various
> files. I'm going to start with one application (\phone_directory\), then
> add two more, once it's going. The default page view will be a menu.
>
> Do I create separate directories for each app, and recreate the blocks
> and queries subdirectories under each, or do I just use one? Looking at
> Steve's sample app_locals.cfm, it appears that it should be in the
> application subdirectory, with an include of the app_globals, one level
> up. But I'm not sure whether all queries are supposed to be in one
> place, as well as all dsp_ and form files, or located under their
> respective directories.
>
> Could someone briefly sketch the rest of it out for me?
>
> Thanks so much,
> --John
> --------------------------------------------------------------------------
----
> 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.

Reply via email to