Using modules or variable controllers - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Using modules or variable controllers (/showthread.php?tid=5600) |
Using modules or variable controllers - El Forum - 01-28-2008 [eluser]Hyra[/eluser] Hey there, I recently installed CodeIgniter hoping it would replace my own MVC framework. So far it's pretty nice and straightforward. I did miss Smarty, but that was easily integrated. So far so good! But here's my question: I am running a site that, at places, is build out of different "components". Depending on the user and his settings, certain modules get loaded and presented. For example. A user can have a little box with a few thumbnails on his personal profile page. In my own version i check if this is the case, and if so fire up an extra controller from the folder "modules", which, after all the magic, returns the data which i can use within smarty. Current way: Code: // Check DB for custom components to load Now, how would this be accomplished within a CI environment. Do I want to put all these little "components" into the system/plugins folder and fire them up when needed? Or should I rather place them in the applications library folder, as most of them use the models of the regular places. In short maybe: What is the best practice to use custom/variable components within the controllers while avoiding a "Matchbox setup". Cheers for any useful pointers! |