From: Raphaƫl Gertz Date: Sat, 12 Oct 2024 23:08:03 +0000 (+0200) Subject: Add title and canonical context X-Git-Tag: 0.0.2~1 X-Git-Url: https://git.rapsys.eu/treebundle/commitdiff_plain/edfc2b18e8b69a2cd62b12d1e2cdaefed4452c18?hp=54b4908c048705b0963c284f465d70d2096fab3a Add title and canonical context Dump response --- 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);