Skip to content

Customize Multiple Sites Completely Separately

zuha edited this page May 15, 2012 · 3 revisions

How to customize sites from the sites directory.

Example 1 (View Only Overwrite)

The following assumes you have already added the line $domains['mydomain.com'] = 'mydomain.com'; to /sites/bootstrap.php

  1. app/Plugin/Contacts/View/Contacts/index.ctp Is the view file used by default when you visit "mydomain.com/contacts/"
  2. If you would like to create your own view file then in /sites/mydomain.com/Config/core.php set the language setting to : Configure::write('Config.language', 'en');
  3. You can then create a substitute view by adding the following file... /sites/mydomain.com/View/locale/en/Plugin/Contacts/Contacts/index.ctp and customize the view as you see fit.

Example 2 (Plugin Overwite)

If instead of a single view you need to update the entire contacts plugin rather than just a view, you would begin by...

  1. copying... /app/Plugin/Contacts
  2. to... /sites/mydomain.com/Plugin/Contacts
  3. You can then customize the controllers, models, views, etc and completely bypass the core app for this single plugin, on this single site (mydomain.com). While all other the sites that use this install will still make use of the main default app/Plugin/Contacts plugin.

Further Reading