Hi all,

I'm trying to migrate my application from Application.cfm to Application.cfc.

It's a CMS, which has an Application.cfm in the site root, which cfincludes a 
/core/_Application.cfm (note the underscore) that is common to all sites that 
use the CMS (the same core code is deployed to each site, no relation between 
sites).
Apart from including the core _Application.cfm, the root Application.cfm 
usually has some site-specific code.
Sometimes, a variable that is set in the core _Application.cfm is overwritten 
in the root Application.cfm.

An example:

/Application.cfm
----------------

<cfset request.appName = "mySiteName"><!--- Unique for each site --->

<cfinclude template="/core/_Application.cfm">

<cfset request.myRequestVar = 2><!--- Overwrite a variable that was set in 
/core/_Application.cfm --->

----------------------

/core/_Application.cfm
----------------------

<cfapplication name="#request.appName#" sessionmanagement="Yes" 
loginstorage="session" sessiontimeout="#CreateTimeSpan(0, 0, 40, 0)#">

<cfset request.myRequestVar = 1>
<cfset request.myOtherRequestVar = "some value">

----------------------

How does this thanslate to Application.cfc?
I'm thinking I have to create a root Application.cfc, which "extends" a 
/core/_Application.cfc.
But where do I overwrite request.myRequestVar?
If I create a new "OnRequestStart" function in the /Application.cfc, it will 
overwrite the "OnRequestStart" function I will have in /core/_Application.cfc.
So the only option would be to copy the complete "OnRequestStart" function from 
/core/_Application.cfc to /Application.cfc, if I'm not mistaken.
Or am I missing something here?

I hope this makes any sense...

Thank's to anyone who can point me in the right direction.

Wim
Belgium 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306212
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to