I'm sure there are other ways to do this but this is how I was able to integrate an existing Model-Glue application into a FarCry site. I am using ModelGlue 2.0, the latest ColdSpring BER as of this posting, and the latest beta of reactor. My MG app in question is a events calendar. Its a pretty simple application using MG, Reactor, and ColdSpring. Because I don't want to use ColdFusion mappings (and its running on CF7 so no per application mappings) I copied modelglue, reactor, and coldspring into {farcry_root}/projects/{site_name}/www as www/modelglue, www/reactor, and www/coldspring. If you are using mappings you can skip that step. Next, I created a simple include file called _mgCal.cfm in {farcry_root}/projects/{site_name}/includedObj. The code for this is as follows:
2
3<cfsetting
4enablecfoutputonly="no">
5
6<cfinclude template="/mg/mgCal/index.cfm"
7/>
8
9<cfsetting enablecfoutputonly="no">
/www/mg/mgCal/ /www/mg/mgCal/config /www/mg/mgCal/controller /www/mg/mgCal/model /www/mg/mgCal/views /www/mg/mgCal/Application.cfm /www/mg/mgCal/index.cfm etcNow we have a few modifications to make to the MG app to get it to run from this location. Depending on how you first created the MG app, your settings may be different. In your MG App's index.cfm file add the following line above the <cfinclude> that calls Model-Glue.
2getDirectoryFromPath(getCurrentTemplatePath()) &
3"/config/ColdSpring.xml" />
2name="viewMappings"><value>/mg/mgCal/views</value></property>
3<property
4name="generatedViewMapping"><value>/mg/mgCal/views/generated</value></property>
5<property
6name="configurationPath"><value>/mg/mgCal/config/ModelGlue.xml</value></property>
7<property
8name="scaffoldPath"><value>/mg/mgCal/config/scaffolds/Scaffolds.xml</value></property>
9<property
10name="defaultTemplate"><value>/go/calendar</value></property>
2name="pathToConfigXml"><value>/mg/mgCal/config/reactor/Reactor.xml</value></constructor-arg>
3<property
4name="mapping"><value>/mg/mgCal/model/data/reactor</value></property>
2viewState.setValue('myself',replace(viewState.getValue('myself'),'?','&','ALL'))
3/>


![[RSS]](/blog/template/rss.png)