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

Reply via email to