Yup cheers, Is there anything wrong with cfmoduling a fuseaction from within a layout file instead of my _switch? I had a big loop created when I tried it from there and thought "nope...this doesn't look right". :).
Have you heard back from the Posties at all regarding the missing 'Conferences in many boxes' at all? Cheers again Drew ----- Original Message ----- From: "hal helms" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 19, 2002 6:21 AM Subject: RE: Moduling circuits > This is really quite simple and works slicker 'n well...you know. Let's > say you want to execute the fuseaction, Cart.addItem. But before that > you want to check if the item is in stock. It so happens you already > have a fuseaction, Inventory.checkStock, that returns a recordset with > the quantity on hand, but that's in the Inventory circuit. Here's how to > handle it: > > In the Cart circuit's FBX_Switch file: > > <cfcase value="addItem"> > <cfmodule template="#Fusebox.rootPath##self#" > fuseaction="Inventory.checkStock"> > <cfinclude template="qry_AddItemToCart.cfm"> > </cfcase> > > The only issue is what scope the Inventory.checkStock returns its record > set in, since it might be called in the normal fashion OR it might be > called as part of a custom tag call. Here's how I do it: > > I put this code in the FBX_Settings.cfm file of the home circuit: > > <cfset Scope=""> > <cfif Fusebox.isCustomTag> > <cfset Scope="caller."> > </cfif> > > Then, any time I want a variable to do double-duty, I just prefix it > with #Scope#variable_Name. Make sense? > > -----Original Message----- > From: Drew Parker [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 18, 2002 2:43 PM > To: [EMAIL PROTECTED] > Subject: Moduling circuits > > > Hi Ppls, > Can spmeone direct me to where I can read up on the 'How to do's' of > using Cfmodule to call certain circuits? > I have a circuit that performs a certain function and rather than > copying the whole circuit into every directory where I need to use this > functionality, I thought a cfmodule call to the circuit would save me > heaps of space. Just how this is done and getting the circuit to > function properly when called as a module, I have no idea. > > Cheers in advance > Drew > > Any word back from the US Postal service Hal? regarding the Conference > in a box? > > > > > ==^================================================================ 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 ==^================================================================
