setFooter example

if ($request->isXmlHttpRequest()) {
                $this->eventDispatcher->dispatch(
                    new GenericPageLoadedEvent($page$context$request)
                );

                return $page;
            }
            $page->setHeader(
                $this->headerLoader->load($request$context)
            );

            $page->setFooter(
                $this->footerLoader->load($request$context)
            );

            $criteria = new Criteria();
            $criteria->setTitle('generic-page::shipping-methods');

            $event = new ShippingMethodRouteRequestEvent($requestnew Request()$context$criteria);
            $this->eventDispatcher->dispatch($event);

            $shippingMethods = $this->shippingMethodRoute
                ->load($event->getStoreApiRequest()$context$event->getCriteria())
                
$response = $this->renderStorefront(
                    '@Storefront/storefront/page/content/index.html.twig',
                    ['page' => $errorPage]
                );
            } else {
                $errorTemplate = $this->errorTemplateResolver->resolve($exception$request);

                if (!$request->isXmlHttpRequest()) {
                    $header = $this->headerPageletLoader->load($request$context);
                    $footer = $this->footerPageletLoader->load($request$context);
                    $errorTemplate->setHeader($header);
                    $errorTemplate->setFooter($footer);
                }

                $response = $this->renderStorefront($errorTemplate->getTemplateName()['page' => $errorTemplate]);
            }

            if ($exception instanceof HttpException) {
                $response->setStatusCode($exception->getStatusCode());
            }
        } catch (\Exception $e) { // final Fallback             $response = $this->renderStorefront(
                '@Storefront/storefront/page/error/index.html.twig',
                [
Home | Imprint | This part of the site doesn't use cookies.