multiple databases, multiple css files |
[eluser]BrianDHall[/eluser]
http://ellislab.com/codeigniter/user-gui...ation.html Quote:Then, to globally tell the system to use that group you would set this variable located in the config file: And http://ellislab.com/codeigniter/user-gui...cting.html Quote:$config['hostname'] = "localhost"; OK, so first you do NOT auto-load the database library. Instead in your controller/my_controller in the constructor you set the database settings and load the database manually based on what client is being requested. You might then set a _CLIENT_ constant, and when you go to load in a view or css files you pull them from a subdirectory, such as $this->load->view(_CLIENT_ . '/main.css'). So you just make a subdirectory for each client. If you want to be really fancy you can check to see if _CLIENT_/file exists, and if not then load a 'common' file - thus you can design a main template for everything, and then only over-ride certain files with client-specific ones if you really want to. That's the general gist of how I'd go about it. There are surely countless more ways to do it, but this is one way that would work. |
Messages In This Thread |
multiple databases, multiple css files - by El Forum - 10-23-2009, 03:04 PM
multiple databases, multiple css files - by El Forum - 10-23-2009, 03:30 PM
multiple databases, multiple css files - by El Forum - 10-23-2009, 03:35 PM
multiple databases, multiple css files - by El Forum - 10-23-2009, 07:34 PM
multiple databases, multiple css files - by El Forum - 10-23-2009, 07:35 PM
multiple databases, multiple css files - by El Forum - 10-23-2009, 11:42 PM
multiple databases, multiple css files - by El Forum - 12-18-2009, 04:35 PM
multiple databases, multiple css files - by El Forum - 12-18-2009, 09:10 PM
|