title: Whats the easiest way to use global variables in twig templates
body: <p>I need to inject a HTML file from another website into my base.html.twig file.</p>
  
  <p>One solution would be to use the php function 'file_get_contents' within my controller and make it available to the template like so:</p>
  
  <pre><code>$globalFooter = file_get_contents('http://mysite.co.uk/footer/footer.html.twig');
  
  return $this-&gt;render('ImagineGdmBundle:Default:product.html.twig', array('globalFooter' =&gt; $globalFooter));
  </code></pre>
  
  <p>But that would mean having to implement the code above to every controller function that uses the footer. Is there a better way?  </p>
  
  <p>Im sure there must be a way to create a global variable and make them available to my base.html.twig template...but I am new to Symfony and am unsure how to do it. Any suggestions??</p>