FW/1轻质脚手架

Jam*_*ler 1 coldfusion scaffolding fw1

我正在尝试为FW/1创建一个轻型脚手架设施.现在我scaffold.cfc在控制器中调用了一个看起来像的文件

<cfcomponent hint="this is expected to be extended, and never used directly">



<cfscript>
function init(fw) { variables.fw = fw; }

void function home (required struct rc) output="false"  {

    /* TODO: Generic load  */

    setView("scaffold.home");
    }

void function create (required struct rc) output="false"    {

    /* TODO: Generic create  */

    setView("scaffold.create");
    }

void function show (required struct rc) output="false"  {

    /* TODO: Generic show  */

    setView("scaffold.show");
    }
Run Code Online (Sandbox Code Playgroud)

...

</cfscript>


</cfcomponent>
Run Code Online (Sandbox Code Playgroud)

我想确保index.cfm?action=scaffold.*index.cfm/scaffold/*永远不会跑.

这是最好的去处?

Sea*_*eld 5

您可以将文件夹放在文件夹scaffold.cfc外部,controllers这样FW/1就不会将其视为控制器CFC(因为您只需要扩展它,而不是直接将其用作控制器).您也可以将它放在文件夹的子controllers文件夹中,同样,FW/1会忽略它.