I’m using HMVC and calling modules in a view. In some cases however, the modules appear before the Doctype! It seems to be caused by calling more than one module into a page but i have instances when i have done this without this happening.
i’m parsing the modules I want to display from the controller into the view
like:
$data['modules'] = array(
'controller/function',
);
$this->load->view('page', $data);
then in the view
foreach($modules as $module){ ?>
<div>
<?php echo modules::run(module); ?>
</div>
<?php }
these divs print fine, and remain where they are supposed to, but for some reason the module jumps before doctype. I’ve checked that all divs in the whole page are closed, for interfering code in the two modules etc but still at a loss
I’ve never come across this before, can anyone help?
Thanks 🙂
This is linked to this post and i fixed it by setting the third parameter to
TRUEand echoing the view like thisecho $this->load->view('account_managers', $data, TRUE);