Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Moving beforeLayout, before additional viewVars are processed. Refs #624
  • Loading branch information
markstory committed Nov 7, 2010
1 parent 09d3a06 commit 157bdfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cake/libs/view/view.php
Expand Up @@ -423,6 +423,7 @@ public function renderLayout($content_for_layout, $layout = null) {
if (empty($layoutFileName)) {
return $this->output;
}
$this->Helpers->trigger('beforeLayout', array(&$this));

$dataForLayout = array_merge($this->viewVars, array(
'content_for_layout' => $content_for_layout,
Expand All @@ -441,7 +442,6 @@ public function renderLayout($content_for_layout, $layout = null) {
$dataForLayout = array_merge($dataForLayout);
}

$this->Helpers->trigger('beforeLayout', array(&$this));
$this->output = $this->_render($layoutFileName, $dataForLayout, $loadHelpers, true);

if ($this->output === false) {
Expand Down

0 comments on commit 157bdfa

Please sign in to comment.