Either that way, or Jeff P's way. Jeff, do you have opinion on the
betterness between the two? Steve's example below means some annoying extra
coding for each fuseaction, but allows the image directory to be anywhere,
regardless of the location of the rest of the circuit. But Jeff's way means
that the circuit is bound to the mappings for it, but there's not that extra
chunk of code for cfincluding indexes.

Nat Papovich
Webthugs Consulting
ICQ 32676414
"If it was hard to write,"
says the Real Programmer,
"it should be hard to understand."


> -----Original Message-----
> From: Steve Nelson [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 14, 2000 10:38 AM
> To: Fusebox
> Subject: Re: the dot notation
>
>
> I have an idea....
>
> how about continue to use request.imagesroot or whatever.  Have a
> default value in your application.cfm, then in your root index.cfm
> change the value in eash of the cfcases.
>
> cfswitch listfirst(attribs.fuseaction)
>          cfcase value "cat"
>                cfset request.imagesroot="/cat"
>                  cfset attribs.fa=listlast(attribs.fa)
>                  cfinclude cat/index.cfm
>          /cfcase
>
>          cfcase value "reg"
>                  cfset request.imagesroot="/reg"
>                cfset attrbs.fa=listlast(attribs.fa)
>                  cfinclude reg/index.cfm
>          /cfcase
>
>          cfcase value "MainPage"
>                  cfset request.imagesroot="/images"
>                cfinclude qry_GetStuff
>                  cfinclude dsp_DispMainPage
>          /cfcase
>
>          cfcase value "logout"
>                  cfset request.imagesroot="/images"
>                cfinclude act_killsession
>                  cfinclude dsp_goodbye
>          /cfcase
>  /cfswitch
>
> Steve Nelson
> http://www.SecretAgents.com
> Tools for Fusebox Developers
> (804) 825-9063
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        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