We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb470e1 commit 8a73a48Copy full SHA for 8a73a48
1 file changed
src/Twig/Template.php
@@ -23,8 +23,16 @@ protected function getDispatcher()
23
public function display(array $context, array $blocks = array())
24
{
25
if ($this->env->isDebug()) {
26
+ $source = $this->getSourceContext();
27
+ $name = $source->getName();
28
+ $path = str_replace(DRUPAL_ROOT . '/', '', $source->getPath());
29
+
30
print('<!-- TWIG DEBUG -->');
- printf('<!-- Template: %s -->', $this->getTemplateName());
31
+ printf('<!-- Template: %s -->', $name);
32
33
+ if ($name !== $path) {
34
+ printf('<!-- Path: %s -->', $path);
35
+ }
36
}
37
38
foreach ($context as $k => $var) {
0 commit comments