title: How to define global variable for Twig
body: <p>I'm using a file serving as a form layout to overwrite certain elements (<em>form_start</em>, <em>form_row</em>, etc.). I register it like:</p>
  
  <pre><code>twig:
      - AcmeMainBundle:Form:formlayout.html.twig
  </code></pre>
  
  <p>Is there a way to use in it my variables provided along with a <strong>form</strong>? </p>
  
  <p>For example, when I send to <strong>index.html.twig</strong></p>
  
  <pre><code>array ('form' =&gt; $formView, 'var' =&gt; $var);
  </code></pre>
  
  <p>Var is defined only in <strong>index.html.twig</strong>.</p>
  
  <p>So how to make <strong>var</strong> defined in <strong>formlayout.html.twig</strong></p>