title: cakephp render + afterfilter variables are unset
body: <p>I am trying to use render for specific action names in my app.
  Actually, here are my condition set in my AppController::afterFilter()</p>
  
  <pre><code>    if($this-&gt;action == 'parameter') {
          $this-&gt;render('/Elements/parameter');
      }
      else if($this-&gt;action == 'datagrid') {
          $this-&gt;render('/Elements/datagrid');
      }
  </code></pre>
  
  <p>And in my controller <code>/samples/parameter</code> :</p>
  
  <pre><code>            $this-&gt;set('model', Inflector::singularize(Inflector::camelize($this-&gt;name)));
          $this-&gt;set('controller', $this-&gt;name);
          if($parameter_id) {
              $this-&gt;set('mode', $mode);
              $this-&gt;set('parameter', $this-&gt;Sample-&gt;find('first', array('conditions' =&gt; array('Sample.id' =&gt; $parameter_id))));
          } else {
              $this-&gt;set('mode', 'add');
              $this-&gt;set('parameter', array());
          }
  </code></pre>
  
  <p>I know that I have to render AFTER the definition of variables, so I use <code>afterFilter</code> Something I don't understand or missed ?</p>
  
  <p><strong>Infos:</strong>
  I have set in <code>Samples Controller</code> the function</p>
  
  <pre><code>    public function afterFilter(){
          parent::afterFilter();
      }
  </code></pre>
  
  <p>Thank you all!</p>