mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 12:05:29 +00:00
conditional for adding start variable to results
This commit is contained in:
parent
4e543ec2b6
commit
f703559d65
@ -63,10 +63,11 @@ class SearchForm extends Form
|
||||
$request = $this->getRequestHandler()->getRequest();
|
||||
|
||||
$searchTerms = $request->requestVar('Search');
|
||||
// for pagination
|
||||
$start = $request->requestVar('start');
|
||||
$query = SearchQuery::create()->addSearchTerm($searchTerms);
|
||||
|
||||
$query = SearchQuery::create()->addSearchTerm($searchTerms)->setStart($start);
|
||||
if($start = $request->requestVar('start')){
|
||||
$query->setStart($start);
|
||||
}
|
||||
|
||||
$params = [
|
||||
'spellcheck' => 'true',
|
||||
|
Loading…
x
Reference in New Issue
Block a user