diff --git a/src/BackendIntegration/TemplateList.php b/src/BackendIntegration/TemplateList.php index 4484f6e38..a7f2f6c82 100644 --- a/src/BackendIntegration/TemplateList.php +++ b/src/BackendIntegration/TemplateList.php @@ -230,7 +230,12 @@ private function getTemplatesForBaseFrom($base, $folder, $themeName, bool $onlyO $templates = []; foreach ($foundTemplates as $template) { /** @var SplFileInfo $template */ - $templates[$template->getBasename('.' . $template->getExtension())] = [$themeName => $themeName]; + if (str_ends_with($template->getBasename(), '.html.twig')) { + $baseName = $template->getBasename('.html.twig'); + } else { + $baseName = $template->getBasename('.' . $template->getExtension()); + } + $templates[$baseName] = [$themeName => $themeName]; } return $templates;