Get custom URL argments by name in my twig file? [SOLVED]


#1

I’ve created a working twig file and now want to embed URL arguments into it by name … looks like I should be able to do this using the moustache syntax but I’m doing something wrong because its not working.

For example, this URL works …

But in my twig file, the reference {{my_abc}} is coming up blank instead of having the value “Tada”.


#2

You’ll need to catch those in your controller and pass it manually to the Twig file. See : https://learn.userfrosting.com/routes-and-controllers/client-input#retrieving-url-parameters


#3

Excellent! Thank’s @Malou — that set me off in the right direction and I got it to work!