Switch-based Controllers
I am ./view/home/switchexample.cfm. I was called from ./controller/switch/switch.cfm.
Here's what the switch looks like:
<cfoutput>
<cfswitch expression="#attributes.fuseaction#">
<cfcase value="hello">
#displayView("hello.switchexample")#
</cfcase>
<cfcase value="goodbye">
<cfinclude template="../../view/hello/goodbye.cfm" />
</cfcase>
<cfdefaultcase>
<p>I am switch.#attributes.fuseaction#, and I don't exist.</p>
</cfdefaultcase>
</cfswitch>
</cfoutput>
Look familiar? It might. It looks a lot like an old Fusebox 2/3 circuit. That's intentional. LightFront's designed to be a nice bridge between old Fusebox 2/3 application styles. It gives you new functionality, through callEvent() and displayView(), plus relocate() works a lot like <cf_location>.
Notice how I was called via LightFront's displayView() function.
Now, say goodbye.
