]> Raphaël G. Git Repositories - blogbundle/commitdiff
Rename rapsys_blog route to rapsysblog
authorRaphaël Gertz <git@rapsys.eu>
Tue, 14 Oct 2025 09:59:28 +0000 (11:59 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Tue, 14 Oct 2025 09:59:28 +0000 (11:59 +0200)
New context layout

Controller/DefaultController.php

index 6333b45e75f5a35670d8697d787c97b86566de21..65f02fed588fef9bc683a473023c7939a18d93e3 100644 (file)
@@ -33,7 +33,7 @@ class DefaultController extends AbstractController {
         */
        public function about(Request $request): Response {
                //Set page
-               $this->context['title'] = $this->translator->trans('About');
+               $this->context['title']['page'] = $this->translator->trans('About');
 
                //Set description
                $this->context['description'] = $this->translator->trans('Welcome to raphaël\'s developer diary about page');
@@ -74,7 +74,7 @@ class DefaultController extends AbstractController {
         */
        public function contact(Request $request): Response {
                //Set title
-               $this->context['title'] = $this->translator->trans('Contact');
+               $this->context['title']['page'] = $this->translator->trans('Contact');
 
                //Set description
                $this->context['description'] = $this->translator->trans('Welcome to raphaël\'s developer diary contact page');
@@ -100,7 +100,7 @@ class DefaultController extends AbstractController {
                //Create the form according to the FormType created previously.
                //And give the proper parameters
                $form = $this->createForm('Rapsys\BlogBundle\Form\ContactType', $data, [
-                       'action' => $this->generateUrl('rapsys_blog_contact'),
+                       'action' => $this->generateUrl('rapsysblog_contact'),
                        'method' => 'POST'
                ]);
 
@@ -261,7 +261,7 @@ class DefaultController extends AbstractController {
                );
 
                //Set title
-               $this->context['title'] = $this->translator->trans('Home');
+               $this->context['title']['page'] = $this->translator->trans('Home');
 
                //Set description
                $this->context['description'] = $this->translator->trans('Welcome to raphaël\'s developer diary');