Include a partial template I'm trying to use Drupal 8, with a custom theme, due big structure differences for my requirements I have a page--front.twig.html and a page.twig.html, I would like to create template parts as used in phrozn oder in a normal Symfony2 project, for example a footer.html.twig and a header.html.twig. These templates are saved under a subdirectory /parts/.

But when I call this templates as normal I just receive a string with the name of the template.

For example:

{# in page.html.twig or page--front.html.twig #}
{% include 'parts/footer.html.twig' %} 


Returns the file name as string:

parts/footer.html.twig


It's possible to do that with Drupal 8?
You can't do relative paths, all paths must either be from the Drupal root or based on the namespaced path to your 'templates' directory: https://www.drupal.org/node/2143557.

I would avoid "from the Drupal root" and use namespaces, at least until https://www.drupal.org/node/2291449 is resolved.

{% include '@mytheme/parts/footer.html.twig' %}



  Edit: If you want to pass additional arguments for loop or for
  checking some vars to your included twig template you should write
  in this way:


{% include '@mytheme/includes/form-block.html.twig' with {dog: true} %}


Edit: Now that https://www.drupal.org/node/2291449 has been committed you can also do:

{% include 'footer.html.twig' %}


See https://www.drupal.org/node/2369981 for why you saw the file name as a string instead of a helpful exception.