How do I pass variables into Twig template?
The '$' isn't used in twig to designate a variable. This code should work:

&lt;a href="{{ path(route_name, {'node': route_parameters}) }}"&gt;
   Link to the object with {{ route_name }} and {{ route_parameters }}
&lt;/a&gt;