Skip to main content
lovewebdev
Inspiring
March 8, 2009
Question

Have Applications.cfm exclude a page?

  • March 8, 2009
  • 3 replies
  • 616 views
Is it possible to have your Applications.cfm not run for a particular page.
    This topic has been closed for replies.

    3 replies

    lovewebdev
    Inspiring
    March 16, 2009
    Nice. Thank you. I'll try it out. I was waiting for that for a long time.
    Participating Frequently
    March 16, 2009
    If you have the pages that you DON'T want the application.cfm to run for in a different directory simply put a new application.cfm with blank content in that directory and it will effectively run 'nothing' instead of the root application.cfm.
    Inspiring
    March 8, 2009
    > Is it possible to have your Applications.cfm not run for a particular page.

    Well you could check the CGI.SCRIPT_NAME of the request you wish to exclude
    in the Application.cfm, and run/not run a block of code accordingly. This
    will quickly become unwieldy though, as more and more requests need
    different configs run.

    You're better off organising your application slightly, having separate
    directories / Application.cfms for different requirements.

    Read this:
    http://livedocs.adobe.com/coldfusion/8/htmldocs/appFramework_06.html

    Also, can I recommend you use Application.cfc rather than Application.cfm,
    if poss.

    --
    Adam