jenssegers / codeigniter-hmvc-modules

Create HMVC modules with this lightweight extension for Codeiginter 2
http://jenssegers.be
187 stars 107 forks source link

General Question #10

Closed tasmanwebsolutions closed 10 years ago

tasmanwebsolutions commented 10 years ago

I can load your $this->load->controller in to the views I would like to know if it is possible to load it in as an array to another controller.

$data = array( 'header' => $this->load->controller('admin/common/header'), 'footer' => $this->load->controller('admin/common/footer') );

$this->load->view('admin/template/common/login', $data);

Wont load view when load like this.

I just don't like how controllers are loaded on to views in hmvc they all should be loaded with in to make them dynamic.

I know you don't do work with codeigniter any more but would you know how I would get around this?

tasmanwebsolutions commented 10 years ago

It works when do this

$data = array( 'header' => $this->load->controller('admin/common/header'), 'footer' => $this->load->controller('admin/common/footer') );

$this->load->view('login', $data);

But views do not pick up in multi level when in other folders. Only works in first level.