Added overridden Keyword
1 unresolved thread
1 unresolved thread
Closes #3420709
Merge request reports
Activity
added 1 commit
- 4482dd68 - Issues/3420709: Implemented the Twig template override logic.
- Resolved by Lee Rowlands
added 13 commits
-
65d5e964...9231c9cf - 12 commits from branch
project:11.x
- 14736268 - Merge branch drupal:11.x into 3420709-make-it-more
-
65d5e964...9231c9cf - 12 commits from branch
added 1 commit
- f5665693 - Second test updated with emojis instead of X and *
added 1 commit
- 82918903 - Show CUSTOM THEME string only for themes in custom folder
101 101 $output['debug_info'] .= "\n-->"; 102 102 } 103 103 } 104 $output['debug_info'] .= "\n<!-- BEGIN OUTPUT from '" . Html::escape($template_file) . "' -->\n"; 104 // Check if the template_file belongs to a custom theme 105 $template_override_status_output = "BEGIN OUTPUT"; 106 if (str_contains($template_file, 'custom')) { I know this has been discussed already - but for me there's just too many false positives and false negatives... a module with custom in the name. A contrib theme with custom in the name. The user not using themes/custom/ etc.... for this to be the correct solution.
If this is actually useful I think it could be changed to detect whether the template is from the active theme.
changed this line in version 10 of the diff
Hi @alexpott I did a new commit with your suggestion as i think
$variables['directory']
contains the active theme so we can use it
added 1 commit
- 5127f949 - New approach for overriding only when the template is deprecated
Please register or sign in to reply