Saturday, October 30, 2010

Re: 2 database, 1 models and controllers, many views

Assuming both sites are on the same server you could bootstrap your
controller and model paths so that you only need to maintain one
version of your logic:

for cake 1.2.x by using $controllerPaths and $modelPaths settings
for cake 1.3.x by using
App::build(array(
'models' => array('/full/path/to/models/', '/next/full/path/to/
models/'),
'controllers' => array('/full/path/to/controllers/', '/next/full/
path/to/controllers/')
));


You should probably also keep your cake core files in one location for
both sites by updating your CAKE_CORE_INCLUDE_PATH constant in webroot/
index.php see the advanced installation docs:
http://book.cakephp.org/view/915/Advanced-Installation

hope this helps

On Oct 29, 4:06 am, Zaky Katalan-Ezra <procsh...@gmail.com> wrote:
> 1. Use themes for two different designs
> 2. Use some sync software like rsync to update one of the sites controllers,
> models.
> 2.1 if both sites on the same server you can use symlink/hardlink (in linux)
> for controller and models in on of the sites
> 3. Set each site with its default theme.
>
> Another idea is to use some prefix for one of the sites like admin prefix.
> In the controller call in each prefix action for the default action .
> function site2_edit()
> {
>    edit();
>
> }
>
> I am not sure but I think you can change the domain name for each prefix in
> the apache level.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: