Somehow the view library isn’t compatible with Modular HMVC, could that be? I’ve combined modular HMVC with Matchbox in the following way:
A controller called “modules” loads my main layout (headers, footers, sidemenu, etc.) and it also loads a view that loads a Matchbox sub-controller for the main-content:
modules::run($module.'/controllers/'.$module, $page, $method);
So far so good, but the sub-controller (modules/blog/controllers/blog.php) goes into an infinite loop when I add this line to it:
$this->view->load('posts'); // view library code for calling a view in modules/blog/views/posts.php
But even the standard way of calling a view doesn’t work like it should work with Matchbox. I now have to call it like:
$this->load->view('../modules/blog/views/posts');
instead of the normal way:
$this->load->view('posts');
Did I do something wrong or something strange? Of course you haven’t created Matchbox, so maybe this question is a bit out of range. Anyway, it would be great if the two could be easily combined.
Another small thing I noticed: when I call the sub-controller directly (through the url) I get the error:
Fatal error: Class ‘HMVC’ not found in /Applications/MAMP/htdocs/trunk/application/modules/blog/controllers/blog.php on line 3
It would be great if you could see the subcontroller’s output there. That way you would have one page containing different subcontrollers, which all can be reached through their own url! I don’t know if that’s possible, though.
Apart from the views, it works just great! Thanx so much!