Welcome Guest, Not a member yet? Register   Sign In
CI3 - wiredesignz HMVC
#4

Hello ambush-reality, welcome to the forum...

I think that Davicotico misunderstood your problem. First of all, when working with views you never use required or include to get the view in your project. The normal way is to use $this->load->view('view_name');.

Because you are using HMCV you can load a view almost the same way. HMVC sometime can sometimes find it without help when you use only the name of the view, but it's easier just to point load in the right direction by addressing the module where the views is located. In your case:

PHP Code:
$this->load->view('module_name/view_name');

// or ..

$this->load->view('templates/header'); 

If you have pass data to the view, it works the normal way like so:

PHP Code:
$data = array();
$data['page_title'] = 'This is the page title';

$this->load->view('templates/header'$data); 

The modules::run() solution Davicotico is referring to is a way to echo the output of a method from a certain module. This is not necessarily needed.

Hope this helps!

-Roger
Reply


Messages In This Thread
CI3 - wiredesignz HMVC - by ambush-reality - 06-03-2015, 09:18 AM
RE: CI3 - wiredesignz HMVC - by davicotico - 06-03-2015, 11:00 AM
RE: CI3 - wiredesignz HMVC - by ambush-reality - 06-03-2015, 12:20 PM
RE: CI3 - wiredesignz HMVC - by RogerMore - 06-04-2015, 12:36 AM
RE: CI3 - wiredesignz HMVC - by mwhitney - 06-04-2015, 07:13 AM
RE: CI3 - wiredesignz HMVC - by ambush-reality - 06-04-2015, 08:11 AM
RE: CI3 - wiredesignz HMVC - by mwhitney - 06-04-2015, 08:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB