How to link URLs and twig templates in Symfony2 ?

In my application there are written references with addresses the correct format (very easy and understandable). Prescribed the previous developer. Kind of like this:
abcd.com/card/add/person
abcd.com/card/show/person
abcd.com/card/list_all_people

Now for each address I need to add a twig template (add_person.html.twig , show_person.html.twig , list_all_people.html.twig).

Questions:
Where (in which directory of the project with symfony2) you should create these templates?
How to communicate with their respective URLs? This is done in the admin or in the config somewhere?
Thanks in advance
September 26th 19 at 06:41
2 answers
September 26th 19 at 06:43
I suspect that you are out there somewhere must be CardController and there is a good all scored either in the annotation @Template or simply call the render function. In bundle, which is your controller (no idea how they have called) there is a directory Resources/views. Good you should create the directory card and to lay down templates.

Details in the documentation for Symfony.
Yes, and CardController there is to say. render the template, as I understand it, these strings?
....
class CardController extends Controller
{
 public function showAction(Request $request, $id)
{
 $card = $this->_getRepository()->find($id);
 /** \123\AppBundle\Entity\Card $card */

 if($card === null)
 throw $this->createNotFoundException('Not found');

 return $this->render('123AppBundle:Card:show.html.twig', array(
 'card' => $card
));
}
....

everything I don't understand how the link is tied to a specific Tigo, and where and how to override this. even in this example, just spelled out a Twigg, but no address.

read the documentation in all possible variants - and for newbies and for pros. just starting to deal with this framework - vicente commented on September 26th 19 at 06:46
Prieska to the links goes through the system marketization (router).

You can see in app/config/routing.yml in Resources/config/routing.yml of your bundle. Perhaps all this is not in the yml file (though I don't think). - Joel.Wisoky36 commented on September 26th 19 at 06:49
Very convenient to use

php app/console router:debug

to view a list of all the ranting or

php app/console router:debug [name of router]

to see what Routh bound. - omari_Hand25 commented on September 26th 19 at 06:52
September 26th 19 at 06:45
maybe someone will be able to visually depict the routing logic in the Symphony (as simple as it really) ?
documentation reads with gaps in understanding

Find more questions by tags Network administrationSymfonyTwig