> I'm using FC 5.0.2 and have setup two sites in the one project using
> branches.
>
> I have setup the domains so they both point to the project/site/www
> directory. Now obviously depending on which domain is used I want to
> send the user to a different branch. What I have done is add nav
> aliases to the two "home" nodes and added a check in the
> onrequeststart of the application.cfc which changes the
> application.navid.home to the right alias
>
> so
> cfif cgi.server_name is "www.site1.com"
>  cfset application.navid.home = application.navid.site1home
> else
>  cfset application.navid.home = application.navid.site2home
>
> Is that the best way to do things? or is there a different / preferred
> way?

Unfortunately if you set the application variable to that value (say  
site 1) on every page request, then everyone browsing site2 will be  
redirected to site1 (back and forth causing a viscous circle).  In the  
approach you're taking the only thing that would work is a variable  
specifically for that client/user (example: The request scope, not the  
application scope).

I have a script I've used for a few years for one of my clients doing  
the same thing you are, but I had to hack FarCry a bit (not advised)  
and use a custom variable throughout all of my webskins (messy, yes -  
but it's been running in FarCry since 2004 and there was no other  
option available back then).

Daemon has been working on a new feature for one their clients called  
"subsites" which does what you're looking for (in their case, I  
believe it does subdomain1.site.com, sub2.site.com, etc - but in  
theory it could be flexible enough to do what you're looking for).   
I'm not positive, but believe it is currently only written for a one- 
case scenario (for one of their clients) and would most likely take  
quite a bit of time to convert into a reusable plugin.  Would people  
be interested in purchasing such a plugin if Daemon spent the time to  
make it?

--
Jeff Coughlin
Web Application Developer
http://jeffcoughlin.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" 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/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to