From 5627d1cece0a4b9c04b46ec6afae69952e4a14df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Auswo=CC=88ger?= Date: Fri, 15 May 2020 18:05:03 +0200 Subject: [PATCH] Fix custom template selection --- src/CustomElements.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CustomElements.php b/src/CustomElements.php index a51fe9a..d301bd2 100644 --- a/src/CustomElements.php +++ b/src/CustomElements.php @@ -481,7 +481,7 @@ protected function createDca($dc, $type, $createFromPost = false, $tmpField = nu ); $GLOBALS['TL_DCA'][$dc->table]['fields']['customTpl']['options_callback'] = function($dc) { - $templates = \Controller::getTemplateGroup($dc->activeRecord->type); + $templates = \Controller::getTemplateGroup($dc->activeRecord->type.'_', [], $dc->activeRecord->type); foreach ($templates as $key => $label) { if (substr($key, -7) === '_config' || $key === $dc->activeRecord->type) { unset($templates[$key]);