title: hmvc Message: Undefined property: CI::$Templates code igniter
body: <p>Hi am watching this video <a href="https://www.youtube.com/watch?v=DS0GeknUkds" rel="nofollow">https://www.youtube.com/watch?v=DS0GeknUkds</a> for setting up my hmvc templates. i am already trying to call other modules but i got the error</p>
  
  <pre><code>Severity: Notice
  
  Message: Undefined property: CI::$Templates
  
  Filename: MX/Controller.php
  
  Line Number: 59
  </code></pre>
  
  <p>i have this templates folder with a controller file Templates.php</p>
  
  <pre><code>&lt;?php
  defined('BASEPATH') OR exit('No direct script access allowed');
  
  class Templates extends MY_Controller{
  
      public function views($data = NULL){
  
          $this-&gt;load-&gt;view('templates/one_view');
      }
  }
  
  ?&gt;
  </code></pre>
  
  <p>this perfectly works if i directly called it. but the problem is on my login module.(<a href="http://localhost/ci_hmvc/index.php/login/index" rel="nofollow">http://localhost/ci_hmvc/index.php/login/index</a>) i get the error, </p>
  
  <pre><code>Message: Undefined property: CI::$Templates
  
  Filename: MX/Controller.php
  
  Line Number: 59 
  </code></pre>
  
  <p>and </p>
  
  <pre><code>Severity: Error
  
  Message: Call to a member function views() on null
  
  Filename: controllers/Login.php
  
  Line Number: 10
  </code></pre>
  
  <p>my controller is, </p>
  
  <p>Login.php</p>
  
  <pre><code>&lt;?php
  defined('BASEPATH') OR exit('No direct script access allowed');
  
  class Login extends MY_Controller{
  
  
      public function index(){
  
          $data['content_view'] = 'login/login_view';
          $this-&gt;Templates-&gt;views($data);
  
      }
  }
  
  ?&gt;
  </code></pre>
  
  <p>how can i resolve this? is there is a problem with the hmvc setting ? or what?</p>
  
  <p>p.s </p>
  
  <p>i extended it to MY_Controllers because i have this file,</p>
  
  <p>MY_Controller.php on my core folder..</p>
  
  <pre><code>&lt;?php
  
  class MY_Controller extends MX_Controller {
  
      function __contsruct()
      {
          parent::__construct();
          $this-&gt;load-&gt;module('Templates');
      }
  
  }
  
  ?&gt; 
  </code></pre>
  
  <p>thanks</p>