Unlike Fusebox there is not a global init variable setting file With MG. If you do need to set up some global vars the way i'm doing this (and seems to be the norm nearly) is:
- Set up a cfc called /config/beans/global.cfc
- Create an xml file at /config/beans/global.xml - (for my current site this covered about 5-8 small
structures/arrays/values that is used through out the site)
- In the controller add the following line -
<cfset variables.global = GetModelGlue().GetConfigBean("global.xml") />
- and on request start -
<cfset arguments.event.setValue("global", variables.global) />
Now on any page to get the variable you want you can use
ColdFISH is developed by Jason Delmore. Source code and license information available at coldfish.riaforge.org
<cfset customerTitles = viewState.getValue('global').getTitles() />
1<cfset customerTitles = viewState.getValue('global').getTitles() />
I've seen no documentation on this, but have posted to the Topica List.
Sean Corfield has another method using a new controller you can find it on the
Topica lists also see the GGCC examples (7/8/9) in his frameworks Pod.
For more information on Config beans in MG see :
Eat Your Beans: ConfigBeans in Model-Glue