public function render($action = null, $layout = null, $file = null) { if (!$this->testView) { $this->renderedAction = $action; } else { return parent::render($action, $layout, $file); } }
/** * view function. * Called by the <username>/<slug>/<revision> route to show a preview page of * a particular node and revision combination. * * @access public * @param mixed $id. Id of the node to view(default: null) * @return void */ public function view($id = null) { if (isset($this->params['slug'])) { $this->params['named']['slug'] = $this->params['slug']; $this->params['named']['revision'] = $this->params['revision']; $this->params['named']['type'] = $this->params['type']; // What node are we looking at? $nodeb = $this->Node->find('first', array('conditions' => array('Node.slug' => $this->params['slug']))); // Find the revision if ($nodeb) { $revision = $this->Revision->find('first', array('conditions' => array('Revision.node_id' => $nodeb['Node']['id'], 'or' => array('Revision.tag' => $this->params['revision'], 'Revision.id' => $this->params['revision'])))); } $this->set('revision', $revision); } return parent::view($id); }