CodeIgniter Forums

Full Version: Multiple Sites with same controllers and classes but different views.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum


Newbie alert :cheese: have just come across codeigniter the other day and from reading alot of the documentation and watching the videos I like what I see and am keen to get started on redeveloping our sites using Codeigniter.

I wanted to ask first if any one can recomend the best way to go about structuring the sites so I can re-use the same controllers and code for each site without duplicating the code. So each site would have the same named views but the html in the views would differ.
The reason for this would be if I had to make a change to a controller or class I would only have to copy it once and not X times for each site. I guess I could do it with symbolic links under linux but was wondering if there was a better way ?

Any help or advice much appreciated.

El Forum

Look into CI native templating and also search CI Wiki for the alternative template engines.


El Forum

if the sites are different...why not create new CI folder?
and just copy the application folder into the new CI folder...that way you will have ALL your controllers/models/helpers
and all you need to do is change the views