[TASK] Use general functionality for fetching templates
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / ContentObject / FluidTemplateContentObject.php
index dbc3d29..85cae47 100644 (file)
@@ -173,10 +173,9 @@ class FluidTemplateContentObject extends AbstractContentObject
         } else {
             // Fetch the Fluid template by file stdWrap
             $file = isset($conf['file.']) ? $this->cObj->stdWrap($conf['file'], $conf['file.']) : $conf['file'];
-            /** @var $templateService \TYPO3\CMS\Core\TypoScript\TemplateService */
-            $templateService = $GLOBALS['TSFE']->tmpl;
-            $templatePathAndFilename = $templateService->getFileName($file);
-            $this->view->setTemplatePathAndFilename(PATH_site . $templatePathAndFilename);
+            // Get the absolute file name
+            $templatePathAndFilename = GeneralUtility::getFileAbsFileName($file);
+            $this->view->setTemplatePathAndFilename($templatePathAndFilename);
         }
     }