Hi,
I've got a message appearing when I enter a search term and redirect to another page:
Redirecting to http://localhost/xxx/ie/home/roi-domestic-help-centre/new-faqsearchpage... (output started on C:\xampp\htdocs\xxx\FAQ\code\Tips.php, line 1)
I do a redirect from the page like this after taking in some form data for Search:
<code>
function doSearchResults($data, $form) {
$url = SEARCHURL;
Session::set('q', $data['q']);
Director::redirect($url);
}
</code>
Tips looks like this
<code>
<?php
class Tips extends Page {
public static $db = array(
"Options" => "Enum('ie, uk')"
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab(
"Root.Content.Main",
new DropdownField(
'Options',
'Choose which country this tip applies to:',
singleton($this->class)->dbObject('Options')->enumValues())
);
return $fields;
}
}
class Tips_Controller extends Page_Controller {
/**
* An array of actions that can be accessed via a request. Each array element should be an action name, and the
* permissions or conditions required to allow the user to access it.
*
* <code>
* array (
* 'action', // anyone can access this action
* 'action' => true, // same as above
* 'action' => 'ADMIN', // you must have ADMIN permissions to access this action
* 'action' => '->checkAction' // you can only access this action if $this->checkAction() returns true
* );
* </code>
*
* @var array
*/
public static $allowed_actions = array (
);
}
?>
</code>
Thanks in advance,
Nick