I've got a content-rich site on our intranet that consists of procedures and
applications. The procedures pages are just straight HTML. So I've got a fuseaction in
my index.cfm files to handle their display:
<cfcase value="ShowProc">
<cfinclude template="procs/dsp_#attributes.procname#.cfm">
</cfcase>
And you just pass the procname parameter in the URL. The other option that I came up
with was to hard-code in a different fuseaction for each of the hundreds of procedures
that are defined in my financial institution.
Is there anything contradictory to any FB principles in doing it this way?
Bill Brown
Desert Schools FCU
>>> "Patrick McElhaney" <[EMAIL PROTECTED]> 1/12/01 8:12 AM >>>
> At 09:25 1/12/01 -0500, you wrote:
> >As I don my flame retardant suit and dunce hat,
> >I can't help but wonder aloud, what is the point? :)
>
> you wouldn't have to add case statements all the time, every time you
> add a fuseaction. It would just work after you drop the file in there.
> I've thought about doing this, but wondered if there was security
> concerns or other problems..
>
So it's basically a hack to break the fusebox model
when it saves 30 seconds of coding? Doesn't that create
an ugly hybrid that's impossible to maintain?
If you insist on being this lazy, may I offer a
suggestion that at least won't compromise security and
butcher FB's beautiful interface?
<cfswitch expression="#attributes.fuseaction#">
<cfcase value="aFuseAction">
<cfinclude template="act_dosomething.cfm">
<cfinclude template="dsp_showsomething.cfm">
</cfcase>
...
<cfdefaultcase>
<cftry>
<cinclude template="FUS_#attributes.fuseaction#.cfm">
</cftry>
</cfdefaultcase>
</cfswitch>
This way you can actually add a new fuseaction by
creating a file named FUS_newfuseactionname.CFM
I can see how this technique can be used as an
iterative step in development, especially when
converting an existing app, but still wouldn't want to
see it in a production enviorment.
Patrick
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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