I'm new on Codeigniter HMVC. I read tut how to install and work with modules and it seems everything fine.
What I'm trying is to work with modules outside application folder, but no luck.
I'm trying to browse to my url: localhost/contacts/admin
applications/config/config.php
// Modular
$config['modules_locations'] = array(
APPPATH.'modules/' => '../../modules/',
);
ROOT/modules/contacts/controller/contacts.php
class Contacts extends MX_Controller {
var $ci;
public function __construct() {
parent::__construct();
$this->ci =& get_instance();
$this->load->helper('url');
}
function admin() {
echo 'Controller: ROOT/Modules/Contacts<br />';
$this->load->view('admin');
}
}
Here it seems everything OK - Controller loaded, but then I start with view, something going crazy:
I have 2 same modules. 1 in a ROOT catalog, another in application catalog. Controller is loaded from ROOT module, but view is from application catalog (application/modules/contacts/views/admin.php).
Then I delete view catalog in application/modules/contacts/view, get error:
Unable to load the requested file: admin.php
If I delete modules catalog from application folder, it load default view.
So can anyone help figure out how to work with HMVC, because until now I can't get it how it works.