mirror of
https://github.com/a2nt/silverstripe-webpack.git
synced 2024-10-22 17:05:31 +02:00
[IMPR] Minor search improvements
This commit is contained in:
parent
0e70a5c690
commit
8e5d69f35f
@ -109,7 +109,7 @@ class PageController extends ContentController
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
RequiredFields::create(['q'])
|
RequiredFields::create(['q'])
|
||||||
)->setFormMethod('POST');
|
)->setFormMethod('GET');
|
||||||
|
|
||||||
$form->setLegend('Search ' . $config->getField('Title') . ' Website');
|
$form->setLegend('Search ' . $config->getField('Title') . ' Website');
|
||||||
|
|
||||||
@ -136,7 +136,8 @@ class PageController extends ContentController
|
|||||||
$pages = SiteTree::get()->filterAny([
|
$pages = SiteTree::get()->filterAny([
|
||||||
'Title:PartialMatch' => $term,
|
'Title:PartialMatch' => $term,
|
||||||
'Content:PartialMatch' => $term,
|
'Content:PartialMatch' => $term,
|
||||||
'ClassName:not' => ErrorPage::class,
|
])->exclude([
|
||||||
|
'ClassName' => ErrorPage::class,
|
||||||
])->sort('Created DESC');
|
])->sort('Created DESC');
|
||||||
|
|
||||||
$results->merge($pages);
|
$results->merge($pages);
|
||||||
|
Loading…
Reference in New Issue
Block a user