You've added code that references the biography circuit, so now it's time to create it! In your application root (the one you're calling "home" in fbx_Circuits.php), Now you must copy the following PHP Fusebox core files into the bio directory (it's a subset of the same files found in your application root): DefaultLayout.php dsp_main.php fbx_SaveContent.php fbx_Settings.php fbx_Switch.php index.php See, there's fbx_Switch.php again! The biography circuit's fbx_Switch.php will include the files needed to satisfy the fuseactions passed to it, as we've already discussed. Open the /bio directory's fbx_Switch.php.You will see similar code to the fbx_Switch.php switch($Fusebox["fuseaction"]) { case "main": case "Fusebox.defaultFuseaction": include("dsp_main.php"); break; default: print "I received a fuseaction called <b>'" . $Fusebox["fuseaction"] . "'</b> that circuit <b>'" . $Fusebox["circuit"] . "'</b> does not have a handler for."; break; } Keep this file open, and focus back on fbx_Switch.php switch($Fusebox["fuseaction"]) { case "main": case "Fusebox.defaultFuseaction": include("dsp_main.php"); break; default: print "I received a fuseaction called <b>'" . $Fusebox["fuseaction"] . "'</b> that circuit <b>'" . $Fusebox["circuit"] . "'</b> does not have a handler for."; break; } Now we're going to adjust the fbx_Switch.php switch($Fusebox["fuseaction"]) { case "main": case "Fusebox.defaultFuseaction": include("dsp_main.php"); break; case "hello_world": include("dsp_hello_world.php"); break; default: print "I received a fuseaction called <b>'" . $Fusebox["fuseaction"] . "'</b> that circuit <b>'" . $Fusebox["circuit"] . "'</b> does not have a handler for."; break; } Now open dsp_main.php in /bio and save it back down as dsp_hello_world.php. <h3>Biography: Hello World!</h3> This is the place where the world can come learn about me. <p> <? echo "<a href=\"$PHP_SELF?fuseaction=".$XFA["home"]."\">Home</a>"; ?>
blog comments powered by Disqus |
|
|
|
|
|
|
|