Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Multiple Application.cfc files

Guest
May 10, 2007 May 10, 2007
Hi everyone,

I was wondering if you could advise. I have my normal site set-up with your standard kind of ad-hoc cfm templates and an application.cfc. All pretty standard.

What I want to know is, If I setup a sub folder called "my_folder" and then have an application.cfc within there with it's own set of ad hoc cfm files (index.cfm etc) - how will it behave having the other application.cfc file in the root?

What I basically want is my sub folder to run as it's own kind of smaller application. I don't want it to inherit anything from the application.cfc in the root of the website. Does coldfusion work like this?

As far as I understand it, CF will first look for an application.cfc file nearest to the template being called, if it doesn't find it, it then goes up a level and so forth - then again, this could be the other way round, going from top (root) through to lower levels until it finds one.

Any help or advice is very welcome, many thanks.

Michael.
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , May 10, 2007 May 10, 2007
you are correct:
application.cfc in same folder is processed if found, if not then parent
folder is looked into for application.cfc, etc etc etc
--

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com
Translate
LEGEND ,
May 10, 2007 May 10, 2007
you are correct:
application.cfc in same folder is processed if found, if not then parent
folder is looked into for application.cfc, etc etc etc
--

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 10, 2007 May 10, 2007
What happened when you tried it?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 10, 2007 May 10, 2007
CF processes the very first Application.cf* file it encounters when moving up the directory tree from the current directory.

So, if there is such a file in the current directory, it uses that file. Once it encounters an Application.cf* file it does NOT continue up the tree and process subsequent Application.cf* files.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 10, 2007 May 10, 2007
LATEST
tclaremont wrote:
> CF processes the very first Application.cf* file it encounters when moving up
> the directory tree from the current directory.

i think using "Application.cf*" is a bit misleading in the context of CF7:
if cf7 encounters BOTH Application.cfc AND Application.cfm it will
process the .cfc and ignore .cfm file


--
Azadi Saryev
Sabai-dee.com
Vientiane, Laos
http://www.sabai-dee.com
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources