Feature #58087

Fluid should support "EXT:" paths

Added by Markus Hölzle over 1 year ago. Updated 7 months ago.

Status:Resolved Start date:2014-04-22
Priority:Should have Due date:
Assigned To:- % Done:

100%

Category:Fluid Spent time: -
Target version:-
PHP Version: Sprint Focus:
Complexity:easy

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         }

Associated revisions

Revision f0f577de
Added by Markus Klein 7 months ago

[BUGFIX] Standalone- and TemplateView must not require ucfirst file names

There's no reason to require ucfirst file names for Layouts and Partials.
This patch allows free naming of Layouts, Partials and Templates.
For best performance we really suggest to stick to UpperCamelCase though.

Change-Id: I04049e2cd248288efb97e06cac3b5d8000fd1d52
Resolves: #63367
Resolves: #58087
Resolves: #64049
Releases: master
Reviewed-on: http://review.typo3.org/34812
Reviewed-by: Alexander Opitz <>
Tested-by: Alexander Opitz <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

History

#1 Updated by Gerrit Code Review over 1 year 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

#2 Updated by Gerrit Code Review about 1 year 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

#3 Updated by Jigal van Hemert about 1 year 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.

#4 Updated by Markus Hölzle about 1 year 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.

#5 Updated by Alexander Opitz 11 months ago

  • Project changed from Fluid to Core
  • Category changed from Fluid: View to Fluid
  • Complexity set to easy

#6 Updated by Gerrit Code Review 7 months 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

#7 Updated by Gerrit Code Review 7 months 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

#8 Updated by Gerrit Code Review 7 months 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

#9 Updated by Gerrit Code Review 7 months 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

#10 Updated by Gerrit Code Review 7 months 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

#11 Updated by Markus Klein 7 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF