$this->
hook(new SearchPageLoadedHook($page,
$context));
return $this->
renderStorefront('@Storefront/storefront/page/search/index.html.twig',
['page' =>
$page]);
} #[Route(path: '/suggest', name: 'frontend.search.suggest', defaults: ['XmlHttpRequest' => true, '_httpCache' => true], methods: ['GET'])]
public function suggest(SalesChannelContext
$context, Request
$request): Response
{ $page =
$this->suggestPageLoader->
load($request,
$context);
$this->
hook(new SuggestPageLoadedHook($page,
$context));
return $this->
renderStorefront('@Storefront/storefront/layout/header/search-suggest.html.twig',
['page' =>
$page]);
} /**
* Route to load the listing filters
*/
#[Route(path: '/widgets/search', name: 'widgets.search.pagelet.v2', defaults: ['XmlHttpRequest' => true, '_routeScope' => ['storefront'], '_httpCache' => true], methods: ['GET', 'POST'])]
public function ajax(Request
$request, SalesChannelContext
$context): Response
{ $request->request->
set('no-aggregations', true
);