[IMPR] Minor search improvements

This commit is contained in:
Tony Air 2023-04-28 20:53:40 +02:00
parent 0e70a5c690
commit 8e5d69f35f
1 changed files with 3 additions and 2 deletions

View File

@ -109,7 +109,7 @@ class PageController extends ContentController
)
),
RequiredFields::create(['q'])
)->setFormMethod('POST');
)->setFormMethod('GET');
$form->setLegend('Search ' . $config->getField('Title') . ' Website');
@ -136,7 +136,8 @@ class PageController extends ContentController
$pages = SiteTree::get()->filterAny([
'Title:PartialMatch' => $term,
'Content:PartialMatch' => $term,
'ClassName:not' => ErrorPage::class,
])->exclude([
'ClassName' => ErrorPage::class,
])->sort('Created DESC');
$results->merge($pages);