hmvc codeigniter
I am aware that you have found your solution and this does not answer the exact question that you asked, however, I would usually do something like that in this way:
<?php class First_module extends MX_Controller { public function index() { $content = array(); //send content array to 2nd view and return everything as a string to be added as content to the first view $content["second_view"] = $this->load->view('second_module_view',$content,true); $this->load->view('first_module_view',$content); } } ?>
First module view then becomes:
<html><body> <h1> hey this is first module </h1> <?php echo $second_view; ?></body>
I've not worked with modules specifically, however this is how I would do it with controllers and views. I would do what I can to limit the calls to models and modules from within the view. Just pass in variables generated in the controller from your models.