A view element on my page depends on a route parameter and will render something if a route parameter is present. Is it possible to access Route parameter in twig template d
I am also having the same problem. To fix this issue I fist dumped the request object and go through the attributes. In attributes you can see all the available properties associated with the request which can be accessed by twig. For example
app.request.attributes('_route'); //gives you route name
app.request.attributes('slug'); //gives you path variable with in the controller with the name 'slug'
You can achieve it like this:
{{ app.request.get('name') }}