Welcome Guest, Not a member yet? Register   Sign In
HMVC Layout system
#1

[eluser]Unknown[/eluser]
Hi everyone :-) (sorry for my english, it's not my born language)
I need some help to construct a layout system with HMVC. (I mean a controller wich autoload header, menu, footer, etc...).
Before using HMVC, I did that with a function in MY_Controller.php. This function triggered à master view like that:

<?php
$this->load->view('front/layout/doctype');
$this->load->view('front/layout/header');
$this->load->view('front/modules/'.$module.'/'.$view, $data);
$this->load->view('front/layout/footer');
?>

But now with HMVC, it's not possible to do like that anymore. I'm coming here to ask you some help to make it in the best possible way.

Thanks a lot.
#2

[eluser]wiredesignz[/eluser]
You may use MX_Controller.php just as you would use MY_Controller.php
#3

[eluser]Unknown[/eluser]
Thanks wiredesignz ;-)
But is it a good way to do that this way with HMVC?
It's for my job and I really want the best layout/views autoloader system. (but I'm a little bit noob :cheese: )




Theme © iAndrew 2016 - Forum software by © MyBB