title: Kohana make View::factory('/foo/bar') hit bar in foo class
body: <p>My issue is that Kohana only renders the view. When I </p>
  
  <p><code>View::factory('/foo/bar')</code> in Controller_Other, it doesn't hit Controller_Foo first. I want it to hit the controller, then render the view.</p>
  
  <pre><code>class Controller_Other extends Controller_Template {
      public $template = 'main';
      public function action_index() {
          $this-&gt;template-&gt;body = View::factory('/foo/bar');
      }
  }
  </code></pre>
  
  <p>How would I get it to run through the controller first:</p>
  
  <pre><code>class Controller_Foo extends Controller_Template {
      public function action_bar() {
          $this-&gt;myVar = 'foo';
      }
  }
  </code></pre>
  
  <p>so that in the view, <code>$myVar</code> is always set in <code>views/foo/bar.php</code> when I call it from some other <code>View::factory()</code>?</p>
  
  <p>Edit:</p>
  
  <p>there must be a cleaner way than forcing <code>action_bar</code> to render its own view to string then going:</p>
  
  <pre><code>$foo = new Controller_Foo($this-&gt;request, $this-&gt;response);
  $this-&gt;template-&gt;body = $foo-&gt;action_bar();
  </code></pre>