Hi Ben,
Are you using CF_BodyContent to assemble your layouts? If not, I recommend
that you do. It makes this kind of component-based layout a whole lot
easier.
Anyway, you can get around this problem with or without CF_BodyContent by
using CFMODULE to call the "toptenlinks" fuseaction. To avoid the
duplicated layout, you have several options, but I like to explicity pass
and handle a parameter that specifies "No Layout". My application looks for
this parameter, and if it is set, then my app returns a chunck of content,
without the column layout.
So at a higher level, my app can call its lower-level self recursively,
using CFMODULE to build the separate pieces, before it assembles them into a
complete page.
I use this kind of approach frequently, especially for apps that generate
static HTML sites from dynamic data. CFMODULE beats the hell out of CFHTTP
for reliability and speed. And it's DEFINITELY better than trying to
duplicate and maintain the low-level calls to your fuses.
Does this make sense, or do you want to see actual code? ;-)
Lee.
>From: "Ben Koshy" <[EMAIL PROTECTED]>
>
>I have a FuseBox application that has a triple column layout.
>
>First Column contains the menu
>Second Column contains the main content
>and the Third Column is for miscellaneous content that changes based on
>what
>circuit you are in
>
>Now I'm finding when I want to include some fuses from a circuit app that I
>have to directly include the circuit files as they would appear in the
>CFSWITCH statement. I'd much rather prefer to call the fuseaction itself
>so
>if I ever update the fuseaction, I won't have to go and update the
>hardcoded. But if I do that I get a replicated layout within my layout
>because the header and footer get called again. IE.
>
>/mainfusebox
> /links
> Fuseaction: DisplayAllLinks
> includes qry_links.cfm
> includes dsp_links.cfm
> Fuseaction: TopTenLinks
> includes qry_toptenlinks.cfm
> includes dsp_links.cfm
> Fuseaction: AddLink
> includes act_addlink.cfm
> includes dsp_submitform.cfm
> /someothercircuit
>
>
>So in my mainfusebox in the 3rd column I call the top-ten links action by
>repeating the same includes for the fuseaction toptenlinks. This is how
>FuseBox.Org does it in their example website. However if I were to change
>TopTenLinks to something like this:
>
> includes qry_toptenlinks.cfm
> includes act_toptenlinks.cfm
> includes dsp_links.cfm
>
>Then I'd have to go back to my hardcoded areas and change the included
>files. Is there someway I can call the fuseaction of this circuit without
>spawning the layout? I guess that's my question... :) Whew...
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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