Skip to content

Commit

Permalink
Fix custom template selection
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed May 15, 2020
1 parent 3c5d006 commit 5627d1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CustomElements.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 5627d1c

Please sign in to comment.