|
Revision 543, 0.9 kB
(checked in by scorfield, 1 year ago)
|
|
Overhaul of skeleton to provide both a traditional (XML fusebox/circuit file) and new (no-XML files) versions.
Note that the new no-XML skeleton depends on Application.cfc and will not run on systems that do not support that.
This is mostly to illustrate how to use Application.cfc instead of fusebox.appinit.cfm and fusebox.init.cfm.
|
| Line | |
|---|
| 1 | <!--- |
|---|
| 2 | fusebox.init.cfm is included by the framework at the start of every request. |
|---|
| 3 | It is included within a cfsilent tag so it cannot generate output. It is |
|---|
| 4 | intended to be for per-request initialization and manipulation of the |
|---|
| 5 | Fusebox fuseaction variables. |
|---|
| 6 | |
|---|
| 7 | You can set attributes.fuseaction, for example, to override the default |
|---|
| 8 | fuseaction. |
|---|
| 9 | |
|---|
| 10 | A typical usage is to set "self" and "myself" variables, as shown below, |
|---|
| 11 | for use inside display fuses when creating links. |
|---|
| 12 | |
|---|
| 13 | Fusebox 5 and earlier - set variables explicitly: |
|---|
| 14 | <cfset self = "index.cfm" /> |
|---|
| 15 | <cfset myself = "#self#?#myFusebox.getApplication().fuseactionVariable#=" /> |
|---|
| 16 | |
|---|
| 17 | Fusebox 5.1 and later - set variables implicitly from the Fusebox itself. |
|---|
| 18 | |
|---|
| 19 | Could also modify the self location here: |
|---|
| 20 | <cfset myFusebox.setSelf("/myapp/start.cfm") /> |
|---|
| 21 | ---> |
|---|
| 22 | <cfset self = myFusebox.getSelf() /> |
|---|
| 23 | <cfset myself = myFusebox.getMyself() /> |
|---|