]> Raphaël G. Git Repositories - treebundle/commitdiff
Add title and canonical context
authorRaphaël Gertz <git@rapsys.eu>
Sat, 12 Oct 2024 23:08:03 +0000 (01:08 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Sat, 12 Oct 2024 23:08:03 +0000 (01:08 +0200)
Dump response

Controller/TreeController.php

index a8f19925ebe27e4f91a1d2cb3998085d54b5a41e..53bd4298b0094d92495c3aef798b685ee91703b6 100644 (file)
@@ -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);