Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Search result url

Go to End

2 Posts   983 Views


Community Member, 59 Posts

1 September 2011 at 7:36pm

Edited: 01/09/2011 7:37pm


Have search working well on my main site that is installed in root folder.

But my test copy on a different server in a sub folder /ss245 doesn't work.
When I hit the search button it takes me to

So what do I change so that this goes to

Code in my page.php:-
function SearchForm() {
$searchText = isset($_REQUEST['Search']) ? $_REQUEST['Search'] : 'Search';

$fields = new FieldSet(
new TextField("Search", "", $searchText)
$actions = new FieldSet(
new FormAction('results', 'Search')

function results($data, $form){
$data = array(
'Results' => $form->getResults(),
'Query' => $form->getSearchQuery(),
'Title' => 'Search Results'
$this->Query = $form->getSearchQuery();

return $this->customise($data)->renderWith(array('Page_results', 'Page'));


Community Member, 59 Posts

4 September 2011 at 6:53am

Sorry guys - this was just a corrupted file in my sapphire folder - nothing more exciting !