Hey, let me try to explain this again using my pat-pending CookBook metaphor.
 
Circuits = CookBooks
Fuseactions = Recipes
Fuses = Ingredients
 
So we can have a Recipe called "bread.pizzabase".  It lives in the "bread" CookBook, and describes how to make a pizza base from simple ingredients.  It says to add flour, salt, yeast, water, etc, mix them up and bake.
 
But we might also have a recipe called "italian.hamandpinapplepizza".  This recipe lives in the "italian" CookBook, and tells us how to make a disgusting ham and pineapple pizza.  It says "make a pizza base as usual (see the Bread CookBook), the throw ham an pineapple on it, and bake."
 
Notice that the recipe for ham and pineapple pizza uses simple ingredients, but also uses a more complex item called a pizza base.  But the ham and pineapple pizza recipe doesn't go to the trouble of telling you how to make the pizza base - it just says to look in your bread CookBook.
 
Let's try this using code...
 
In our Bread CookBook/Circuit, we have a recipe/fuseaction called "pizzabase":
<cfcase value="pizzabase">
  <cfinclude template="act_addflour.cfm">
  <cfinclude template="act_addsalt.cfm">
  <cfinclude template="act_addyeast.cfm">
  <cfinclude template="act_addwater.cfm">
  <cfinclude template="act_mix.cfm">
  <cfinclude template="act_bake.cfm">
</cfcase>
 
In out Italian CookBook/Circuit, we have a recipe/fuseaction called "hamandpineapplepizza":
<cfcase value="hamandpineapplepizza">
  <cfmodule template="#fusebox.rootpath##self#" fuseaction="bread.pizzabase">
  <cfinclude template="act_addham.cfm">
  <cfinclude template="act_addpineapple.cfm">
  <cfinclude template="act_bake.cfm">
</cfcase>
 
I hope that helps a little more.
 
Let me know,
LeeBB

----- Original Message -----

 
Hi B,
 
You can use CFMODULE calls within fbx_switch.  You do this when you want to reuse a function that is more involved than a simple atomic fuse.
 
A common example is adding a serach for to a search results page.  You have already built the "displaysearchform" fuseaction and another call "displaysearchresults".  Now you decide that you'd like to include a form to do another search on the results page.  No sweat - use CFMODULE within the displaysearchresults fuseaction to invoke the displaysearchform:
<cfcase value="displaysearchresults">
  <cfmodule template="#fusebox.rootpath##self#" fuseaction="search.displaysearchform" stoplayout="true">
  <cfinclude template="qry_searchresults.cfm">
  <cfinclude template="dsp_searchresults.cfm">
</cfcase>
 
So this fuseaction invokes one high-level fuseaction, plus two low-level fuses to perform its required job.
 
That means that you now have the search form code in one and only one place.  You can enhance it, optimise it, blah blah blah it, and all the changes get carried into the sewarch results fuseaction as well.
 
Now, the meaning of  fuseaction="adminrules.ValidateEmail" ...
 
In FB3, each fuseaction lives within a particular circuit.  In order to call a particular fuseaction, you have to give the name of the circuit and the name of the fuseaction within that circuit.
 
So fuseaction="adminrules.ValidateEmail" means "give me the fuseaction called ValidateEmail within the circuit called adminrules".
 
Hope that helps,
LeeBB

----- Original Message -----

 
Lee to my rescue again...thanks!  Don't want to wear out your
assistance, but 2 questions occur to me:

1) I would use CFMODULE inside fbx_switch, correct?

2) I am not clear on the atribute:

fuseaction="adminrules.ValidateEmail"

So this means you call one fuse to execute within another fuse?  That
would seem different than including the code in the fuse you wish to
execute.

Thanks for your help!
==^================================================================
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
==^================================================================

Reply via email to