Andy Jarrett // Code. Develop. Create.

Model Glue Controller config explained

Below is a quick run down of the config.xml setting in Model Glue, though i would like to take credit :o) i got this from the MG lists, posted by Doug Hughes

Here's a rundown of the settings:
<setting name="applicationMapping" value="/" />


This is where your application is located. If it's in a subdirectory (or a
mapping put that here.
<setting name="beanMappings" value="/config/beans/" />


This is a comma separated list of locations where your config beans can be
found.
<setting name="viewMappings" value="/views" />


This is a comma separated list of where your views can be found.
<setting name="reload" value="true" />


This indicates if the entire framework and all of your controllers are
loaded on each request. Set this to true for development, false for
production.
<setting name="defaultEvent" value="Home" />


This is the event handler executed when the no event=xyz is provided.
<setting name="debug" value="true" />


This indicates if debug information should be appended to the end of the
request.

(These are all optional as of 1.0 - which is not yet released.)
<setting name="defaultEvent" value="Home" />


(see above)
<setting name="reloadKey" value="init" />


This is the name of a url var which can be passed into manually reload an
app when not auto reloading.
<setting name="reloadPassword" value="true" />


This is the value which the reloadKey must be to do the reload. Change this
for production. This would be something like
http://myapp/index.cfm?init=true
<setting name="statePrecedence" value="Form" />


For any http request there can be url and/or form data sent.
statePrecedence sets which is used, if the same var exists in both. IE, if
you post a form with a url var foo=bar, and have a form var foo=moo. Then
with the statePrecedence being "form" you'll see "moo" as the value for foo
in your event object.
<setting name="eventValue" value="event" />


This is the name of the url/form var used to indicate the event to execute.

<setting name="defaultTemplate" value="index.cfm" />


Not sure -- this is new :)
<setting name="defaultExceptionHandler" value="Exception" />


This is the event handler executed if there's an error on the site.
<setting name="defaultCacheTimeout" value="5" />


If you use MG's cache, this is the default timeout for items.

Hope that helps.

I’m here, learning and working away. If you liked this content and want to keep me going, consider buying me a coffee. Your support keeps this site running and the coffee brewing! ☕️