Welcome Guest, Not a member yet? Register   Sign In
Problem using _output in MY_Controller
#1

[eluser]Unknown[/eluser]
Hi

Have a little problem with my MY_Controller

The code:

Code:
class MY_Controller extends CI_Controller {

    public $title = 'My website';
    // The template will use this to include default.css by default
    public $styles = array('default');

    function __construct()
    {
            parent::__construct();
    }

    function _output($content)
    {
        // Load the base template with output content available as $content
        $data['content'] = &$content;
        $this->load->view('shared/layout', $data);
    }
}

My Welcome controller:

Code:
class Welcome extends MY_Controller {

public $title = "Home";

public function __construct()
    {
         parent::__construct();
    }

public function index()
{
  $this->load->view('welcome_message');
}
}
The problem is that nothing is loaded, only a white blank page. No errors.
I have followed this: http://stackoverflow.com/questions/36751...es#tab-top

Any suggestions on how I can solve this?




Theme © iAndrew 2016 - Forum software by © MyBB