symfony - Twig: Access a parameters in url -


suppose have symfony url: http:/www.site.com/page/parameter

how can access "parameter" in twig? mean, conversion of $this->getpageparams() in symfony repository.

i don't want explode url or similar, it's weird.

thanks!

in order access last element of pathinfo, following:

{{ app.request.pathinfo|split('/')|last }} 

see this working example


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -