EllisLab text mark
Advanced Search
     
Load HMVC custom config files per module?
Posted: 23 April 2012 04:03 PM
Joined: 2011-06-24
101 posts

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)?:

application/modules/module/config.php or
application/modules/module/config/config.php 

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

$config $this->load->config('module/config');
$config $this->load->config('config'); 

But all I get when I var_dump is:

bool(false// Not loaded I guess 

Anyone have an idea?

 
Posted: 24 April 2012 08:26 AM   [ # 1 ]   [ Rating: 0 ]
Joined: 2008-10-14
57 posts

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.

$this->config->item('xyz');