I understand what you say and see why, but I am not sure I understand or
agree. If I am at some top level and I want to "jump" to a particular
fuseaction within another circuit (which I agree may not always be advisable
but sometimes not within our control), I would need to include a fuseaction
with the include string. Say for example I am not just going to the "about"
circuit in my site, but want to go directly from my home page to my "goals"
or "mission" statement page in the about circuit. In your example, this
might be impossible, excepting of course that "attributes.fuseaction" still
exists in scope for a <cfinclude>'d file. Is that last argument the one you
would agree with the most or is there another rational. Keep in mind too
that I do not necessarily want to argue this point, but Mr. Helm's makes it
clear in his example site and documentation that the proper way to "jump
circuit" is to include and pass the fuseaction of choice to that circuit...a
point of view with which you are clearly not agreeing with.
Comments on this strategy?
Mike Craig
-----Original Message-----
From: Ken Beard [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 06, 2001 1:30 PM
To: Fusebox
Subject: Re: XFB pointers
no reason to pass url variables on a server side include
just
<cfinclude template="about/index.cfm">
and all your variables will be visible within.
At 05:01 AM 3/6/01 -0500, you wrote:
>I have been trying to convert a site to use Hals new XFB techniques and
have
>stumbled across a problem I cannot seem to overcome easily. There is a
>point in every index.cfm files where the following code occurs prior to the
>main switch case:
>
><cfif ListLen(attributes.fuseaction, ".") GT 1>
> <cfinclude template="#ListFirst(attributes.fuseaction,
>".")#/index.cfm?fuseaction=#attributes.fuseaction#">
><cfelse>
> blah blah switch statement.
>
>The problem is, no matter what I seem to do, I cannot get CF to see the
>include...it always thinks its missing. When I output the same code using
>to reference the template, I get
>
>about/index.cfm?fuseaction=about.home
>
>which I think is correct. And since this index.cfm is at the root of the
>application, I assumed that this syntax would actually be ok.
>
>My circuits are defined as...
>
> request.circuits = StructNew();
> request.circuits.home = "newapp";
> request.circuits.newapp = "newapp";
> request.circuits.about = "newapp.about";
>
>and keep in mind that on my home server as well as the hosting service I
>use, there is a CF mapping called /newapp/ that points to the root
>application directory. I have tried appending the template string with
>#request.cfroot# which is "/newapp" to no avail and I have tried everyother
>string combination I can think of.
>
>Finally, the only solution that works if using cflocation instead of
>include. In a way, this makes more sense to me since in "normal" FB, I
have
>always used a redirector (url_ file with cflocation in it) to move from one
>circuit to another, whether they were nested or not. This had the affect
of
>making my "base url" that circuits directory. Maybe that is how it has to
>be done, maybe that is the wrong approach.
>
>Has anyone been sucessfully implementing this technique that could point me
>to the error of my ways? A trimmed down version of the index.cfm file is
>below. Thanks in advance.
>
>Mike
>
>
><cfinclude template="app_locals.cfm">
><cfparam name="attributes.fuseaction" default="home.home">
>
><cfif not IsDefined("application.applicationname")>
> <cfapplication name="newapp"
> applicationtimeout="#CreateTimeSpan(1,0,0,0)#"
> sessiontimeout="#CreateTimeSpan(0,1,30,0)#"
> sessionmanagement="Yes"
> setclientcookies="Yes"
> clientmanagement="Yes"
> clientstorage="#request.db.main#">
></cfif>
>
><cftry>
> <cfif Not IsDefined("request.circuits")>
> <cfinclude template="app_circuits.cfm">
> </cfif>
> <cfcatch type="MissingInclude">
> No Circuits have been defined
> <cfabort>
> </cfcatch>
></cftry>
>
><cfmodule template="#request.localtags#/Nesting.cfm">
>
><cfoutput>#attributes.fuseaction#</cfoutput>
>
><cfif ListLen(attributes.fuseaction, ".") GT 1>
> <cfinclude template="#ListFirst(attributes.fuseaction,
>".")#/index.cfm?fuseaction=#attributes.fuseaction#">
><cfelse>
> <cfmodule template="#request.localtags#/bodycontent.cfm">
> <cfswitch expression="#Attributes.fuseaction#">
> <cfcase value="about">
> <cflocation
> url="/about/index.cfm?fuseaction=about.home">
> </cfcase>
> <cfdefaultcase>
> <cfinclude
> template="displayers/dsp_home.cfm">
> </cfdefaultcase>
> </cfswitch>
> </cfmodule>
></cfif>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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