Answer the question
In order to leave comments, you need to log in
How to link urls and twig templates in Symfony2 ?
I have written links in the application with addresses of the correct formats (quite intelligible and understandable). Written by a previous developer. It looks like this:
abcd.com/card/add/person
abcd.com/card/show/person
abcd.com/card/list_all_people
Now I need to add a twig template to each address (add_person.html.twig , show_person.html.twig , list_all_people.html.twig).
Questions:
Where (in which symfony2 project directory) should these templates be created?
How do I link them to their respective urls? Is this done in the admin panel or in some config?
Thanks in advance
Answer the question
In order to leave comments, you need to log in
I suspect that you should have a CardController somewhere and there all this stuff is stuffed either in the @Template annotation or the render function is simply called. In the bundle in which your controller is located (no idea what they are called) there is a Resources/views directory. For good, you should create a card directory in it and put templates there.
See the Symfony documentation for details.
can someone visually be able to depict the routing logic in symphony (as simple as it is generally real)?
documentation is read with gaps in understanding
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question