Jeff, Funny you should ask, we have spend a fair amount of time recently solving this exact issue. The route we went down was similar to how Model-Glue 0.9 introduced it used to do it with a multiple site 'instances'. Basically we have our default Model-Glue deployed application and within that application we have sub-folders. We then used a SessionFacade to keep track of the site that your on and pass that VIA ColdSpring to everything that needs to know about what Site it's on. What this allows us to do is have a core-level of Model-Glue events, that is inherited by all the sub-sites. This optionally can be overridden or extended within each sub-site. So if you have unique templates or queries for each site, just override the event handler for your template, and your set.
I'll give you a brief overview / code samples to get started let me know if you need anymore specific details. ColdSpring - passing Session facade 1. create a bean with setters/getters for all the properties of the site that you would like to keep track of 2. create a generic session facade to wrap your session calls 3. push this session facade to anything that needs it When you change sites, you just need to update the bean with that sites data and push it to the facade, now everything that calls it will have the updated information. Here is a full example: http://tblurb.com/UIi8l8 Folder Layout: Here is how we structure our folders for sites. Note everything for the client is store within the client folder project folder/ client/ (root application - instance one) site1/ (instance two) site1/views/ site2/ (instance three) site2/views/ controller/ model/ views/ Within the additional instance folders (site1, site2) you'll need to setup the Application.cfc and the index.cfm to reference the root parent. One side effect of this is because Model-Glue uses relative urls and we specifically subdomain directly to the folders we had to add an application specific mapping (CF8), an alternative would be to setup a ColdFusion mapping for the project. I would love to see how to avoid any mappings here in general, but we just couldn't figure it would without modifications to core MG code. Example Code here: http://tblurb.com/7CxatJ The real trick was altering our CMS to work with all these new settings but I'm happy to say we're pretty close to working out all the bugs. Let us know if you have any other questions / solutions here because we'd definitely be interested in discussing this more. Thanks, Roy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "model-glue" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/model-glue?hl=en For more about Model-Glue, check http://www.model-glue.com . -~----------~----~----~----~------~----~------~--~---
