Moving beforeLayout, before additional viewVars are processed. Refs #624

This commit is contained in:
Mark Story 2010-10-31 23:07:18 -04:00 committed by mark_story
parent 09d3a0626a
commit 157bdfafc6

View file

@ -423,6 +423,7 @@ class View extends Object {
if (empty($layoutFileName)) {
return $this->output;
}
$this->Helpers->trigger('beforeLayout', array(&$this));
$dataForLayout = array_merge($this->viewVars, array(
'content_for_layout' => $content_for_layout,
@ -441,7 +442,6 @@ class View extends Object {
$dataForLayout = array_merge($dataForLayout);
}
$this->Helpers->trigger('beforeLayout', array(&$this));
$this->output = $this->_render($layoutFileName, $dataForLayout, $loadHelpers, true);
if ($this->output === false) {