Feature #58087
closedFluid should support "EXT:" paths
100%
Description
In extbase controllers you can set a template path:
$this->view->setTemplatePathAndFilename(...);
This should support paths like "EXT:extension_key/Private/Templates/List.html"
In the current version this throws an InvalidTemplateResourceException in TYPO3\CMS\Fluid\View\TemplateView Line 338:
334 protected function getTemplateSource($actionName = NULL) { 335 $templatePathAndFilename = $this->getTemplatePathAndFilename($actionName); 336 $templateSource = file_get_contents($templatePathAndFilename); 337 if ($templateSource === FALSE) { 338 throw new Exception\InvalidTemplateResourceException('"' . $templatePathAndFilename . '" is not a valid template resource URI.', 1257246929); 339 } 340 return $templateSource; 341 }
Updated by Gerrit Code Review over 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29614
Updated by Gerrit Code Review over 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29614
Updated by Jigal van Hemert over 10 years ago
Can you give a use case where it's not possible to get the correct path when calling setTemplatePathAndFilename() ?
You could either call extension management utility to get the path to an extension or use the suggested getFileAbsFileName() to get it parsed automagically.
setTemplatePathAndFilename() says it expects an absolute path to the file.
Updated by Markus Hölzle over 10 years ago
Ok, I think it's always possible to call the getAbsFileName() manually. I just thought it would be a little simpler for developers because it would be more consistent to call always paths like "EXT:".
In my example I can set the template path for some actions via typoscript extension settings.
Updated by Alexander Opitz about 10 years ago
- Project changed from 2559 to TYPO3 Core
- Category changed from Fluid: View to Fluid
- Complexity set to easy
Updated by Gerrit Code Review almost 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/29614
Updated by Gerrit Code Review almost 10 years ago
Patch set 22 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34812
Updated by Gerrit Code Review almost 10 years ago
Patch set 23 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34812
Updated by Gerrit Code Review almost 10 years ago
Patch set 24 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34812
Updated by Gerrit Code Review almost 10 years ago
Patch set 25 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34812
Updated by Markus Klein almost 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f0f577de0ce97e3d3579e81148fb98160b62fdaf.