From edfc2b18e8b69a2cd62b12d1e2cdaefed4452c18 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Sun, 13 Oct 2024 01:08:03 +0200 Subject: [PATCH] Add title and canonical context Dump response --- Controller/TreeController.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Controller/TreeController.php b/Controller/TreeController.php index a8f1992..53bd429 100644 --- a/Controller/TreeController.php +++ b/Controller/TreeController.php @@ -46,8 +46,20 @@ class TreeController extends AbstractController { * @return Response The rendered view */ public function index(Request $request, string $path): Response { + //Set title + $this->context['title'] = [ + 'page' => 'Page title', + 'section' => 'Section title', + 'site' => 'Site title' + ]; + + //Set canonical + $this->context['canonical'] = ''; + //Render template $response = $this->twig->render('@RapsysTree/index.html.twig', $this->context); + var_dump($response); + exit; $response->setEtag(md5($response->getContent())); $response->setPublic(); $response->isNotModified($request); -- 2.41.1