Model Glue - Setting up global variables
- 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 smallstructures/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
<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