From 157bdfafc61bc14c4091fd5e910c40552e31b672 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sun, 31 Oct 2010 23:07:18 -0400 Subject: [PATCH] Moving beforeLayout, before additional viewVars are processed. Refs #624 --- cake/libs/view/view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cake/libs/view/view.php b/cake/libs/view/view.php index 33b42902a..49bb7bf44 100644 --- a/cake/libs/view/view.php +++ b/cake/libs/view/view.php @@ -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) {