title: How to pass a JavaScript variable to include Twig Template?
body: <p>probably it's simple to do, but until now I could not get it working.
  The question is about how to pass a variable from JavaScript/Jquery to the include of a twig template at runtime.</p>
  
  <p>Here is what I'm trying to do within Ajax success function:</p>
  
  <pre><code>    $.ajax({
      //some code
  
      success: function (response, textStatus, jqXHR) {
      var partita = response.partita;
  
      $("#myDiv").innerHTML({% include ":staff:ViewInfoPartita.html.twig" with {"partita" : partita} only %});
  }
  
  });
  </code></pre>
  
  <p>The error thrown is: "Variable "partita" does not exist."</p>