As I play with FuseQ, one problem that I kind of kept getting was that upon each iteration of the fuseactions in the que, the global layout would be applied, so I'd get the global layout nested inside the global layout, once for each fuseaction that the FuseQ executed. This is partly because I am using "attributes.suppresslayout" and setting it to FALSE by default, so that the layout file is processed with each of the fuseactions.
One solution I came up with was to change it so "attributes.suppresslayout" is TRUE by default. But then I realized, how do I know when (and where) to set "attributes.suppresslayout = FALSE" so that the layout gets applied? I really want the layout to be applied last, after all the fuseactions in the que are done. This is what I came up with, and I'd be interested to hear John's, Hal's, or others' thoughts: My view circuit's fbx_layouts looks like: <cfparam name="attributes.suppresslayout" default="Yes"> <cfset fusebox.layoutdir=""> <cfif attributes.suppresslayout> <cfset fusebox.layoutfile = ""> <cfelse> <cfset fusebox.layoutfile = "out_productlayout.cfm"> </cfif> Then, in my view circut's fbx_switch, I added an action: <cfcase value="applylayout"> <cfset attributes.suppresslayout = "No"> </cfcase> And finally, in my Controller circuit, I add a fuseaction to the que to apply the layout as the LAST action in the que: <cfcase value="productdetails"> <cfset AddToQ( 'products_model.getproductdetails' ) /> <cfset AddToQ( 'products_view.showproductdetails' ) /> <cfset AddToQ( 'products_view.applylayout' )> </cfcase> Now, I have no idea if this is a good idea or not, or if it is over-complicating something that is more easily done in another way. This is just me playing around and trying stuff out. I thought I'd see what other folks think. Thanks, Brian ==^================================================================ This email was sent to: [email protected] EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9 Or send an email to: [EMAIL PROTECTED] T O P I C A -- Register now to manage your mail! http://www.topica.com/partner/tag02/register ==^================================================================
