Skip to main content
Participant
October 19, 2011
Question

Shared Application.cfm files

  • October 19, 2011
  • 1 reply
  • 584 views

I have multiple sites set up for different countries/languages. The sites are virtually identical, except for the content; and I am reusing as much code as possible. Each site is set up as follows:

site    >>    server path

http:\\www.[domain].com   >>  c:\web\us\

http:\\www.[domain].de  >> c:\web\de\

http:\\www.[domain].fr  >> c:\web\fr\

etc...

Is there any issue with using a single Application.cfm file at the root of c:\web, as opposed to using separate identical Application.cfm files for each site?  In case you are wondering, yes I am still using Application.cfm but considering updating to Application.cfc.  Does that change the answer to my question?

This topic has been closed for replies.

1 reply

Owainnorth
Inspiring
October 20, 2011

I'm not sure whether Application.cfm supports extending, I wouldn't have thought so as it's not a cfc. The way to do it is to have an Application.cfc in the root which does all you want it to do, then all the subdirectories extend that, i.e. <cfcomponent extends="Application.cfc">.

You might need to use the ApplicationBase method, Google around and you'll find it. But that's the way to go. And yes, you should definitely change to App.cfc.