CodeIgniter Forums
Multiple Sites - Different Views Approach - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived General Discussion (
+--- Thread: Multiple Sites - Different Views Approach (/thread-35616.html)

Multiple Sites - Different Views Approach - El Forum - 11-04-2010

Just wondering if this is an okay approach (open for suggestions!).

Goal: Sites have same underlying functionality (share controllers, models, etc), but different frontend view (each has it's own view).

Current implementation:

Work on local machine, make commits to remote SVN repository, then a hook pushes the code to each site.

my config.php
//get current working directory and determine site based off that
if(strpos(getcwd(), "site1") === false)
    $config['site'] = 'site1';
    $config['site'] = 'site2';

example "People" controller
//site determines which directory in the views directory to use
$this->load->view($CI->config->slash_item('site'). '/people_view');

Concern: each site has the other's views (even though endusers will never know it (only going to have 3 sites max).