0
votes

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

1

1 Answers

0
votes

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

You can get it like this:

{{ app.request.get('tag') }}