Voici mon fichier routing.yml

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
xx_homepage:
    path:     /hello/{name}
    defaults: { _controller: xxBundle:Default:index }
xx_liste:
    path:     /liste
    defaults: { _controller: xxBundle:Default:index2 }	
xx_semaine:
    path:     /Semaine
    defaults: { _controller: xxBundle:Default:index3 }	
xx_date:
    path:     /date
    defaults: { _controller: xxBundle:Default:index4 }
Voici les partie du DefaultController :


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 public function indexAction($name)
    {
        return $this->render('xxBundle:Default:index.html.twig', array('name' => $name));
    }
 public function index2Action($name)
    {
        return $this->render('xxBundle:Default:index2.html.twig', array('name' => $name));
    }
 public function index3Action($name)
    {
        return $this->render(xxBundle:Default:index3.html.twig', array('name' => $name));
    }
 public function index4Action($name)
    {
        return $this->render('xxBundle:Default:index4.html.twig', array('name' => $name));
    }
Avec pour message d'erreur : lorque je veux aller sur l'URL /liste , il m'affiche :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
Controller "X\xxBundle\Controller\DefaultController::index2Action" for URI "/liste" is not callable.