21293 Posts in 5733 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 439 Views |
-
Search result url

1 September 2011 at 7:36pm Last edited: 1 September 2011 7:37pm
Hi,
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 www.mysite.com/home/SearchForm?action_results=Search&Search=wotilookforSo what do I change so that this goes to
www.mysite.com/ss245/home/SearchForm?action_results=Search&Search=wotilookforThanks
Martin
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){
$form->classesToSearch(array('SiteTree'));
$data = array(
'Results' => $form->getResults(),
'Query' => $form->getSearchQuery(),
'Title' => 'Search Results'
);
$this->Query = $form->getSearchQuery();return $this->customise($data)->renderWith(array('Page_results', 'Page'));
} -
Re: Search result url

4 September 2011 at 6:53am
Sorry guys - this was just a corrupted file in my sapphire folder - nothing more exciting !
| 439 Views | ||
|
Page:
1
|
Go to Top |

