title: How to load a template from full path in the template engine TWIG
body: <p>I'm wondering how to load a template from it's full path (like <strong>FILE</strong> constant give).</p>
  
  <p>Actually you have to set a "root" path for template like this :</p>
  
  <pre><code>require_once '/path/to/lib/Twig/Autoloader.php';
  Twig_Autoloader::register();
  
  $loader = new Twig_Loader_Filesystem('/path/to/templates');
  $twig = new Twig_Environment($loader, array(
     'cache' =&gt; '/path/to/compilation_cache',
  ));
  </code></pre>
  
  <p>And then :</p>
  
  <pre><code>$template = $twig-&gt;loadTemplate('index.html');
  echo $template-&gt;render(array('the' =&gt; 'variables', 'go' =&gt; 'here'));
  </code></pre>
  
  <p>I want to call the loadTemplate method with a full path and not the just the name of the file.</p>
  
  <p>How can i do ?</p>
  
  <p>I don't want to create my own loader for such an thing..</p>
  
  <p>Thanks</p>