Welcome Guest, Not a member yet? Register   Sign In
Having troubles with Loader class and HMVC
#3

[eluser]Twisted1919[/eluser]
Me again Big Grin
My first approach was kinda wrong i think .
All i had to do :
1. On HMVC's Controller class after line 85 (the foreach loop) i added :
Code:
$this->_ci_view_path = APPPATH.'templates/';
//So it becomes
/* ci loader references */
        foreach (get_class_vars('CI_Loader') as $var => $val) {
            $this->$var =& CI::$APP->load->$var;
         }
        $this->_ci_view_path = APPPATH.'templates/';
On line 239 , in the load function i've changed to :
Code:
list($path, $view) = Modules::find($view, $this->_module, 'templates/');
//instead of
list($path, $view) = Modules::find($view, $this->_module, 'views/');

And on Modules.php on line 168 i changed to
Code:
if ($base == 'models/' OR $base == 'forms/' OR $base == 'templates/')
//instead of
if ($base == 'views/' OR $base == 'models/' OR $base == 'forms/')

Now it works perfect , maybe this will help somebody else without HMVC experience as i am Smile


Messages In This Thread
Having troubles with Loader class and HMVC - by El Forum - 11-29-2009, 12:43 PM
Having troubles with Loader class and HMVC - by El Forum - 11-29-2009, 01:08 PM
Having troubles with Loader class and HMVC - by El Forum - 11-29-2009, 01:45 PM
Having troubles with Loader class and HMVC - by El Forum - 11-29-2009, 05:32 PM
Having troubles with Loader class and HMVC - by El Forum - 11-30-2009, 05:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB