Does anybody know how to get the current URI in a Twig template?
I’ve read through the documentation and I’m unable to find the Twig function to do this.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to read it into a view variable:
The
appglobal view variable contains all sorts of useful shortcuts, such asapp.sessionandapp.security.token.user, that reference the services you might use in a controller.