Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twig Symfony2 get Request variable

Tags:

twig

symfony

I know I can do this:

app.request.get('name') 

...but how do I do this?

app.request.get(twig_var_name) 

I've tried every obvious solution {{}} () etc.

Is it possible?

like image 332
user2143356 Avatar asked Apr 07 '13 22:04

user2143356


1 Answers

have you tried :

app.request.get('' ~ twig_var_name) 
like image 89
S.Thiongane Avatar answered Oct 02 '22 14:10

S.Thiongane