0

get the current path in a Twig (and not the full URL), i.e. I don't want http://localhost:8000/app_dev.php/content/tag/1, I only need /1

Kay
  • 196
  • 1
  • 7
  • possible duplicate of [get current url in twig template?](http://stackoverflow.com/questions/9378714/get-current-url-in-twig-template) – Darragh Enright Aug 21 '15 at 09:31

1 Answers1

0

I think you have a variable on your route called tag right?

You can get it like this:

{{ app.request.get('tag') }} 
Canser Yanbakan
  • 3,780
  • 3
  • 39
  • 65