Short answer. If you're looking for a twig template to move around the search form, no you can't.
Long answer. Drupal core search dynamically builds its search routes for all searchable entities then handles the page render via SearchController::view()
. The controller view method only defines the theme functions/templates for the search results, not the search page as a whole.
If you wanted to move these around the render form & results elements,
It's possible to override the search routes via a custom module so the _controller
property points to a custom controller that extends SearchController
and defines a view()
method that does something like:
// in my custom search controller:
public function view(Request $request, SearchPageInterface $entity) {
$build = parent::view($request, $entity);
// @TODO: alter $build render array so form / results are re-ordered
return $build;
}