Welcome Guest, Not a member yet? Register   Sign In
HMVC problem loading views
#21

[eluser]Jason Hamilton-Mascioli[/eluser]
Came across this issue and gave me some difficulty. I didn't realize the originating controller (application/controllers/*.*) needed to be modified to extend the MX_Controller as well as the controllers located in the modules folder. Now the partial views play nicely.
#22

[eluser]broncha[/eluser]
Hi,

I am getting this error when I extend the controller to MX_Controller
Here is my controller controller
Code:
<?php (defined('BASEPATH')) OR exit('No direct script access allowed');

class Front extends MX_Controller
{
    public function __construct()
    {
        parent::__construct();
    }
    
    public function index()
    {
        $this->load->view('outletlocator/front/modmap');
    }
}

I get the following error
Fatal error: Cannot redeclare class CI in C:\xampp\htdocs\sbi-web\application\third_party\MX\Base.php on line 57

When I extend it to CI_Controller it works.
Before, I was getting "File could not be located" error even when I extended it to CI_Controller, and this solved it.

Code:
$this->load->view('module_name/view_name');




Theme © iAndrew 2016 - Forum software by © MyBB