How different are we talking here?
If you just mean different CSS, it may be easy to use some sort of
dirty hack based on $_SERVER (not very Cakey, but you still have php
under all that) when you use the css include.
If you want something a bit more, you should be able to have multiple
app directories. It may be easier to have a main app directory with
the code, and another for the other looks, which has the controller
and model directories symlinked to the first app's copy, you then have
a completely independent set of views for your other domain.
Another more elegant, and much more Cakey approach would be to set the
viewPaths in the bootstrap based on the $_SERVER['HTTP_HOST'].
e.g.
switch($_SERVER['HTTP_HOST']) {
case "site1.com":
$viewPaths = array('path_to_app/views');
break;
case "site2.net":
$viewPaths = array('path_to_theme/views','path_to_app/views');
break;
}
The presence of both paths in the second site will mean cake will
automatically default to the main site views, and allow you to
selectively override them. Note that the same will also work for
layouts.
Simon
http://www.simonellistonball.com/
On Apr 1, 10:39 am, Barry <[EMAIL PROTECTED]> wrote:
> Hello
>
> I need to setup multiple domains for 1 website.
> There will be a default domain with a default layout for
> examplewww.default.com.
> When a user visitswww.example.comit the site needs to be the same
> but with a different layout.
> I want the same code base to run on all the sites - they must just
> look different.
> What would be the way to implement this?
>
> Thanks
> Barry
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---