![]() |
Load HMVC custom config files per module? - 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: Load HMVC custom config files per module? (/showthread.php?tid=51171) |
Load HMVC custom config files per module? - El Forum - 04-23-2012 [eluser]Sven Delle[/eluser] The absolutely bloated HMVC thread gives no answer (and no overview), so I'm trying here. How do I load a custom config file (from a controller or view) for a module stored in a config.php file in the root of a module (also tried in a config folder)?: Code: application/modules/module/config.php or And what is the requirements for this file? I've tried reading ALL of the HMVC wiki. But I can't seem to figure this one out (either). I've been trying all versions of Code: $config = $this->load->config('module/config'); But all I get when I var_dump is: Code: bool(false) // Not loaded I guess Anyone have an idea? Load HMVC custom config files per module? - El Forum - 04-24-2012 [eluser]Stoney[/eluser] I have used : application/modules/my_app/config/config.php HMVC should autoload your config when your module loads in. You just use it like before. Code: $this->config->item('xyz'); |