• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Load HMVC custom config files per module?

#1
[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
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
Code:
$config = $this->load->config('module/config');
$config = $this->load->config('config');

But all I get when I var_dump is:
Code:
bool(false) // Not loaded I guess

Anyone have an idea?

#2
[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');


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.