Reputation: 4350
I have a url: http://myserver.com/mypage?vid=1234
I want to output 1234 on to the page. I have tried this but it is not working:
{{ app.request.get('vid') }}
what am I doing wrong or missing?
Upvotes: 1
Views: 4629
Reputation: 1497
You can do this by using the "query" object :
{{ app.request.query.get('vid') }}
But you should get this value in the controller and then pass it to twig.
EDIT : This answer is based on the asumption that you are using Symfony Framework
Upvotes: 3