Hi Sean,
maybe I need to commit that I'm bit hung up on "include" - because thats the way I implemented it years ago :-)
I thought about a real "dirty" way to do the "include" way like this:
fw1_proxy.cfm (inside /applications/usermanager/):
<cfscript>
request.fw1=createObject("component","Application");
if((structKeyExists(url,"reload") && url.reload=="true") || not structKeyExists(application,"userManager")) {
request.fw1.onApplicationStart();
}
if(not structKeyExists(session,"userManager")) {
request.fw1.onSessionStart();
}
try {
request.fw1.onRequestStart("/applications/usermanager/index.cfm");
request.fw1.onRequest("/applications/usermanager/index.cfm");
request.fw1.onRequestEnd();
} catch (any fw1RequestError) {
request.fw1.onError(fw1RequestError,"");
}
</cfscript>
Application.cfc (inside /applications/usermanager/)
component extends="org.corfield.framework" {
//this.mappings["/userManager"] = getDirectoryFromPath(getCurrentTemplatePath());
//
this.name = 'fw1-userManager';
// FW/1 - configuration:
variables.framework = {
base = "/applications/userManager/",
home = "user.default",
trace = false,
applicationKey="userManager"
};
function setupApplication()
{
var beanFactory = new ioc( "/applications/usermanager/model" );
setBeanFactory( beanFactory );
}
function setupSession() {
structInsert(session,variables.framework.applicationKey,structNew(),true);
structInsert(session[variables.framework.applicationKey],"initialized",true);
}
}
And the templates generated by the cms (running in root folder with an Application.cfc to add session management and...) "include" the fw1_proxy.cfm in the specified folder. With this method I got the userManager example from github (2.5RC1) running with only the changes made inside the Applications.cfc...
But I don't think its not a good way.
Any thoughts on how I can add interactive code (like a discussion board, login form...) easily into a cfml template which is generated by a cms? Instead of Mura were using a cms that generates individual, independent cfml files physically on the server out of the database and some parts of those cfml templates should contain a way to "include" interactive stuff delivered by an FW1 app.
I'm open to suggestions.
Greetings
Ulf