title: Using Javascript variable in Twig template using Silex framework
body: <p>I am trying to create a route inside of some Javascript inside of a Twig template and need to use a JS variable as a value to a route parameter.</p>
  
  <p>Example:</p>
  
  <pre><code>window.location.href = {{ path('post_display', { 'id': this_is_where_i_need_to_use_the_js_var }) }};
  </code></pre>
  
  <p>I am using the Silex framework and am unsure if FOS JS works for Silex. I don't think it does, though.</p>