Skip to content

Commit 3bed998

Browse files
authored
Merge pull request #1540 from MetaModels/hotfix/fix_twig_template_support
Fix template twig support
2 parents df227b9 + c1d5f06 commit 3bed998

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/BackendIntegration/TemplateList.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,12 @@ private function getTemplatesForBaseFrom($base, $folder, $themeName, bool $onlyO
230230
$templates = [];
231231
foreach ($foundTemplates as $template) {
232232
/** @var SplFileInfo $template */
233-
$templates[$template->getBasename('.' . $template->getExtension())] = [$themeName => $themeName];
233+
if (str_ends_with($template->getBasename(), '.html.twig')) {
234+
$baseName = $template->getBasename('.html.twig');
235+
} else {
236+
$baseName = $template->getBasename('.' . $template->getExtension());
237+
}
238+
$templates[$baseName] = [$themeName => $themeName];
234239
}
235240

236241
return $templates;

0 commit comments

Comments
 (0)