Title: RE: Settings Down / Layout Up

Ok, I've solved my problem, I didn't have a circuit mapped to the admin directory itself:

<!--- Admin Circuits --->

<!--- this is the one I needed for the nesting to function properly --->
<cfset fusebox.Circuits.admin = "home/admin">


<cfset fusebox.Circuits.admin_people = "home/admin/CMS_PEOPLE">
<cfset fusebox.Circuits.admin_content = "home/admin/CMS_CONTENT">
<cfset fusebox.Circuits.admin_locations = "home/admin/CMS_LOCATIONS">
<cfset fusebox.Circuits.admin_pAreas = "home/admin/CMS_PRACTICEAREAS">
<cfset fusebox.Circuits.admin_tasks = "home/admin/CMS_WORKFLOW">
<cfset fusebox.Circuits.admin_calendar = "home/admin/CMS_CALENDAR">
<cfset fusebox.Circuits.admin_system = "home/admin/CMS_SYSTEM">


Without a circuit actually mapped to the admin directory, nesting skips it! I don't know if that's part of the spec. or not, but it sort of makes sense. Why would I want layouts to be included from some directory that isn't even mapped in the fusebox. But what about the circuits that were mapped to sub-dirs under that dir? Well, since admin wasn't specified as a circuit itself, fusebox just ignored it in the settings/layout process, but still knows where to go to get at those other circuits.

Hmm - there's still the 'issue' of not having a reverse lookup for duplicate circuits. I'm wondering if that can affect anything else. For instance I have:


<cfset fusebox.Circuits.CMS_people = "home/admin/CMS_PEOPLE">
<cfset fusebox.Circuits.admin_people = "home/admin/CMS_PEOPLE">


There will be no reverse lookup for the admin_people circuit. Unless I'm reading the condition wrong, step 9 explicitly checks for its existence to determine whether to include the fbx_settings:

<cfif StructKeyExists(FB_.ReverseCircuitPath, fusebox.Circuits[fusebox.HomeCircuit] & "/" & FB_.CorePath)>
        <cfset fusebox.thisCircuit=FB_.ReverseCircuitPath[fusebox.Circuits[fusebox.HomeCircuit] & "/" & FB_.CorePath] >

        <cfif fusebox.thisCircuit EQ fusebox.TargetCircuit>
                <cfset fusebox.IsTargetCircuit=TRUE>
        <cfelse>
                <cfset fusebox.IsTargetCircuit=FALSE>
        </cfif>
        <cfinclude template="#fusebox.currentPath#fbx_Settings.cfm"><!---include the actual file--->
</cfif>


Maybe one of the l337 council memb3rz can make some sense of my bantering.

Adam.



-----Original Message-----
From: Cantrell, Adam [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 12:02 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Settings Down / Layout Up




I've pasted my fbx_circuits below. I don't have any variables set that would supress the layout in the admin directory, but I wouldn't think that's the problem since my fbx_settings in that directory isn't even being included.

After snooping around a little more in the core file, I noticed that step 9 makes use of the FB_.ReverseCircuitPath structure, so I looked at how that struct is built in step 6. Wouldn't this code not allow two circuits to be mapped to the same directory? Or at least, not allow proper nesting of multiple circuits which are mapped to the same directory, since the nesting in step 9 relies on the reverse lookups to include the proper settings files?

FB_.ReverseCircuitPath=StructNew();
        for (aCircuitName in fusebox.Circuits){
                FB_.ReverseCircuitPath[fusebox.Circuits[aCircuitName]]=aCircuitName;
                if (ListLen(fusebox.Circuits[aCircuitName], "/") EQ 1){
                        fusebox.HomeCircuit=aCircuitName;
                        fusebox.IsHomeCircuit=TRUE;}}



I used cf_dump to verify, and confirmed that you can only have one reverse lookup per directory - which makes sense. Two reverse lookups don't make sense. But when step nine relies on this structure to include the proper settings/layouts - things start to 'break'. Am I using an out of date core file, or am I halucinating at work again? Is this the desired functionality of the core file?


Here's my fbx_circuits where you can see I have multiple circuits mapped to the same directory. (it's a work in progress).


<!---
<fusedoc fuse="FBX_Circuits.cfm">
        <responsibilities>
                I define the Circuits structure used with Fusebox 3.0
        </responsibilities>    
        <io>
                <out>
                        <string name="fusebox.circuits.*" comments="set a variable for each circuit name" />
                </out>
        </io>
</fusedoc>
--->
<!--- this file contains all the circuit definitions for the fusebox --->
<cfset fusebox.Circuits.home =  "home">
<cfset fusebox.Circuits.CMS =   "home/CMS">
<cfset fusebox.Circuits.search =        "home/search">
<cfset fusebox.Circuits.calendar =      "home/calendar2">
<!--- <cfset fusebox.Circuits.taskmanager = "home/CMS/taskmanager"> --->
<cfset fusebox.Circuits.taskmanager = "home/admin/CMS_WORKFLOW">
<cfset fusebox.Circuits.orgadmin = "home/admin/CMS_PEOPLE">
<cfset fusebox.Circuits.calendarmanager = "home/CMS/calendar">
<cfset fusebox.Circuits.userpreferences = "home/UserPreferences">
<cfset fusebox.Circuits.probonoPrograms = "home/probonoPrograms">


<!--- Admin Circuits --->
<cfset fusebox.Circuits.admin_people = "home/admin/CMS_PEOPLE">
<cfset fusebox.Circuits.admin_content = "home/admin/CMS_CONTENT">
<cfset fusebox.Circuits.admin_locations = "home/admin/CMS_LOCATIONS">
<cfset fusebox.Circuits.admin_pAreas = "home/admin/CMS_PRACTICEAREAS">
<cfset fusebox.Circuits.admin_tasks = "home/admin/CMS_WORKFLOW">
<cfset fusebox.Circuits.admin_calendar = "home/admin/CMS_CALENDAR">
<cfset fusebox.Circuits.admin_system = "home/admin/CMS_SYSTEM">




> -----Original Message-----
> From: John Quarto-vonTivadar [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 02, 2002 10:56 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Settings Down / Layout Up
>
>
> Adam,
>
> post the COMPLETE fbx_circuits file (the top-level one, that
> is the only one
> that ever counts) as well as the values for any
> layout-related varaibles
> that you've set (example:  attributes.suppresslayout) in any
> fbx_settings
> file and any conditional logic in any of the "should have
> been included but
> were not" intervening circuits' fbx_layouts files.  It will
> stick out like a
> sore thumb that way :)!
>
> ----- Original Message -----
> From: "Cantrell, Adam" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, April 02, 2002 11:43 AM
> Subject: Settings Down / Layout Up
>
>
> >
> > After looking at section 9 of the core file, it's my
> understanding that
> > within a nested layout fusebox app, ALL of the fbx_settings
> are executed
> on
> > the way down to the target circuit, and then ALL the
> layouts are wrapped
> > around it on the way up. For some reason, only my home and
> target are
> being
> > included in this process. I couldn't really tell from the
> core file why
> this
> > might be occurring, hopefully somebody can help me out real quick.
> >
> > My example:
> >
> > <cfset fusebox.Circuits.admin_content = "home/admin/CMS_CONTENT">
> >
> > The fbx_settings in the admin directory won't be called on
> the way down,
> and
> > its layout won't be called on the way back up. Could there
> be a setting
> that
> > I've mistakenly set and have forgotten about that could be
> causing this?
> >
> > The admin directory used to be (and still is if you type
> the sub-dir in
> the
> > url) a standalone FB3 app, so it has a core file and a
> fbx_circuits file,
> > but I don't think that should affect anything. I didn't see
> the core file
> > checking for those when including settings/layouts. When I
> call admin
> > directly, the fbx_settings and fbx_layouts works fine.
> >
> > This has to be something staring me in the face, maybe
> somebody has a
> > suggestion on what to look for.
> >
> > Adam.
> >
> >
>
>
>

==^================================================================
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9
Or send an email to: [EMAIL PROTECTED]

T O P I C A -- Register now to manage your mail!
http://www.topica.com/partner/tag02/register
==^================================================================

Reply via email to