I have been experimenting with this approach - bit of R&D at this stage as
proof of concept for upcoming project

in project/config/_serverSpecificRequestScope.cfm
I put this test

<cfif CGI.SERVER_NAME EQ "site1.myCompany.com">
    <cfset REQUEST.homeID = APPLICATION.navid.site1HOME>
    <cfset REQUEST.Section = "site2" />
<cfelseif CGI.SERVER_NAME EQ "site2.myCompany.com">
    <cfset REQUEST.homeID = APPLICATION.navid.site2HOME />
    <cfset REQUEST.Section = "site2" />
<cfelseif CGI.SERVER_NAME EQ "site3.myCompany.com">
    <cfset REQUEST.homeID = APPLICATION.navid.site3HOME />
    <cfset REQUEST.Section = "site3" />
<cfelse>
    <cfset REQUEST.homeID = APPLICATION.navid.wwwHOME />
    <cfset REQUEST.Section = "Home" />
</cfif>
<cfif NOT IsDefined("URL.objectID")>
        <cfset URL.objectID = REQUEST.homeID />
</cfif>

Where in the site tree, at the same level as the default home, I create new
nav nodes, one for each site, and give them an alias that is used in the
above code.


I would appreciate comments on this approach.

2009/1/23 raZorTT <[email protected]>

>
> Hi,
>
> 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?
>
> Cheers,
> Simon
> >
>


-- 
AJ Mercer
Web Log: http://webonix.net


Once you come to the realisation that everyone is crazy,
You will never be surprised or disappointed ever again.
AJM 2008

--~--~---------~--~----~------------~-------~--~----~
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