From f6b153116db68efdafd124479d86d32b10f9f229 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Mon, 4 Nov 2024 15:07:48 +0100 Subject: [PATCH] Still deliver expected template for backend module Keep old logic to auto determine the expected templates. Remove no longer used configuration. Resolves: #11479 --- Classes/Controller/Backend/AbstractController.php | 7 ++++++- Configuration/TypoScript/Default/Setup.typoscript | 5 ----- .../Private/Templates/Backend/Configuration/Index.html | 4 ++-- Resources/Private/Templates/Backend/Import/Index.html | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Classes/Controller/Backend/AbstractController.php b/Classes/Controller/Backend/AbstractController.php index fe4ed3c..7d6361a 100644 --- a/Classes/Controller/Backend/AbstractController.php +++ b/Classes/Controller/Backend/AbstractController.php @@ -47,6 +47,11 @@ abstract class AbstractController extends ActionController protected function htmlResponse(?string $html = null): ResponseInterface { - return parent::htmlResponse($html ?? $this->moduleTemplate->render()); + $action = sprintf( + '%s/%s', + str_replace('\\', '/', $this->request->getControllerName()), + ucfirst($this->request->getControllerActionName()), + ); + return parent::htmlResponse($html ?? $this->moduleTemplate->render($action)); } } diff --git a/Configuration/TypoScript/Default/Setup.typoscript b/Configuration/TypoScript/Default/Setup.typoscript index b05171b..28807d3 100644 --- a/Configuration/TypoScript/Default/Setup.typoscript +++ b/Configuration/TypoScript/Default/Setup.typoscript @@ -5,10 +5,5 @@ module { tx_thuecat_import_configuration = 0 } } - view { - templateRootPaths { - 0 = EXT:thuecat/Resources/Private/Templates/ - } - } } } diff --git a/Resources/Private/Templates/Backend/Configuration/Index.html b/Resources/Private/Templates/Backend/Configuration/Index.html index 160692e..fd19022 100644 --- a/Resources/Private/Templates/Backend/Configuration/Index.html +++ b/Resources/Private/Templates/Backend/Configuration/Index.html @@ -54,7 +54,7 @@ -
+
@@ -104,7 +104,7 @@ -
+
diff --git a/Resources/Private/Templates/Backend/Import/Index.html b/Resources/Private/Templates/Backend/Import/Index.html index 14e1214..612e3c8 100644 --- a/Resources/Private/Templates/Backend/Import/Index.html +++ b/Resources/Private/Templates/Backend/Import/Index.html @@ -24,7 +24,7 @@ -
+