diff --git a/mysite/code/Page.php b/mysite/code/Page.php index 7d9d708..f0b0c73 100755 --- a/mysite/code/Page.php +++ b/mysite/code/Page.php @@ -1,17 +1,15 @@ $form->getResults(), - 'Query' => $form->getSearchQuery(), - 'Title' => 'Search Results' - ); - - return $this->customise($data)->renderWith(array('Page_results', 'Page')); + function results($data, $form, $request) { + $data = array( + 'Results' => $form->getResults(), + 'Query' => $form->getSearchQuery(), + 'Title' => 'Search Results' + ); + return $this->customise($data)->renderWith(array('Page_results', 'Page')); } - -} -?> \ No newline at end of file +} \ No newline at end of file