Short answer: Use Fusebox.isTargetCircuit instead.

Fusebox.isHomeCircuit always returns true because you're
always pointing your browser to the index.cfm in that
circuit.

For example, say your site looks like this:

/top
/top/a
/top/a/1
/top/a/2
/top/b
/top/c


If you call any of these...
/top/a/index.cfm?fuseacation=a.hello
/top/a/index.cfm?fuseacation=1.hello
/top/a/index.cfm?fuseacation=2.hello

The value of isHomeCircuit in /top/a/fbx_layouts.cfm
will always be true, because "a" is the home circuit.

But suppose you call the same fuseactions from "top":
/top/index.cfm?fuseacation=a.hello
/top/index.cfm?fuseacation=1.hello
/top/index.cfm?fuseacation=2.hello

Now the value of isHomeCircuit in /top/a/fbx_layouts.cfm
will be false. In /top/fbx_layouts.cfm it will be true.
The home circuit is the circuit that contains the core
file and the fbx_circuits file and the index.cfm to
which you point your browser.

It sounds like you want to know where the home circuit
contains the fuseaction, or whether the fuseaction is
found in one of the child circuits. In other words, "Is
this circuit the target circuit"? To get that, you can
use fusebox.isTargetCircuit.

<cfif fusebox.isTargetCircuit>
  <cfset fusebox.layoutFile="lay_topSection.cfm">
<cfelse>
  <cfset fusebox.layoutFile="lay_subSections.cfm"
</cfif>

HTH,

Patrick




> -----Original Message-----
> From: Ney Andr� de Mello Zunino [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 8:18 AM
> To: Fusebox mailing list
> Subject: Fusebox.isHomeCircuit and layouts
>
>
> Hello.
>
> The 'Fusebox Newbie Guide' demonstrates how the Fusebox API variable
> 'isHomeCircuit' may be used to write control logic in the
> fbx_Layouts.cfm file. However, I have not been able to
> acomplish that,
> since fusebox.isHomeCircuit always returns true. In my
> current setting,
> only the root fbx_Layouts.cfm contains data, while the ones
> in the other
> circuits are empty (read: copied from the core files). What I
> am trying
> to achieve is a different layout for the main page and the
> other pages.
> I know I could append layout information by editing the
> fbx_Layouts.cfm
> file for the inner circuits, but that would be overkill, since I only
> have two cases: home circuit or not. What am I missing?
>
> Thank you,
>
> --
> Ney Andr� de Mello Zunino
> Media and Technology Laboratory
> Campus Computing Centre
> United Nations University
>
>

==^================================================================
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