twig_namespace_test.html.twig

Same filename in other branches
  1. 9 core/modules/system/tests/modules/twig_theme_test/templates/twig_namespace_test.html.twig
  2. 10 core/modules/system/tests/modules/twig_theme_test/templates/twig_namespace_test.html.twig
  3. 11.x core/modules/system/tests/modules/twig_theme_test/templates/twig_namespace_test.html.twig
{% extends "@twig_namespace_a/test.html.twig" %}

{% block content %}
  {% include "@twig_namespace_b/test.html.twig" %}
{% endblock %}
1 theme call to twig_namespace_test.html.twig
TwigNamespaceTest::testTwigNamespaces in core/modules/system/tests/src/Kernel/Theme/TwigNamespaceTest.php
Tests template extension and includes using namespaces.

File

core/modules/system/tests/modules/twig_theme_test/templates/twig_namespace_test.html.twig

View source
  1. {% extends "@twig_namespace_a/test.html.twig" %}
  2. {% block content %}
  3. {% include "@twig_namespace_b/test.html.twig" %}
  4. {% endblock %}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.