Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Sean Corfield has <a href="http://corfield.org/blog/index.cfm/do/blog.entry/entry/Extending_Your_Root_Applicationcfc" rel="noreferrer">a blog entry explaining how to extend a root Application.cfc</a>.</p> <p>Below is the relevant information copied from that entry.</p> <hr> <p>Here's your root CFC /Application.cfc:</p> <pre><code>&lt;cfcomponent&gt; &lt;cfset this.name = "cf7app" /&gt; &lt;cfset this.sessionmanagement = true /&gt; &lt;/cfcomponent&gt; </code></pre> <p>Here's your proxy CFC /ApplicationProxy.cfc:</p> <pre><code>&lt;cfcomponent extends="Application"&gt; &lt;/cfcomponent&gt; </code></pre> <p>It's completely empty and serves merely to create an alias for your root /Application.cfc. Here's your subdirectory CFC /app/Application.cfc:</p> <pre><code>&lt;cfcomponent extends="ApplicationProxy"&gt; &lt;cffunction name="onSessionStart"&gt; &lt;cfoutput&gt;&lt;p&gt;app.Application.onSessionStart()&lt;/p&gt;&lt;/cfoutput&gt; &lt;cfset session.counter = 0 /&gt; &lt;/cffunction&gt; &lt;cffunction name="onRequestStart"&gt; &lt;cfoutput&gt;&lt;p&gt;app.Application.onRequestStart()&lt;/p&gt;&lt;/cfoutput&gt; &lt;cfdump label="application" var="#application#"/&gt; &lt;/cffunction&gt; &lt;/cfcomponent&gt; </code></pre> <hr> <p>The root of <em>each</em> individual site should have its own Master App:</p> <pre><code>/site1/Application.cfc /site2/Application.cfc /site3/Application.cfc </code></pre> <p>All these applications are separate individual apps with nothing shared between them.</p> <p>If any of these individual sites need to have sub-applications, then there should be ApplicationProxy.cfc alonside the Master,</p> <pre><code>e.g. /site1/ApplicationProxy.cfc /site2/ApplicationProxy.cfc </code></pre> <p>Then, for each sub-application you have the one that extends the proxy:</p> <pre><code>e.g. /site1/subA/Application.cfc /site1/subB/Application.cfc /site2/subA/Application.cfc </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload