Project

General

Profile

Actions

Feature #58087

closed

Fluid should support "EXT:" paths

Added by Markus Hölzle over 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2014-04-22
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
easy
Sprint Focus:

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         }


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #67033: Fluid StandaloneView does not resolve paths like EXT:my_ext/foo/barClosed2015-05-19

Actions
Actions #1

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

Actions #2

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

Actions #3

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.

Actions #4

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.

Actions #5

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
Actions #6

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

Actions #7

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

Actions #8

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

Actions #9

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

Actions #10

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

Actions #11

Updated by Markus Klein almost 10 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF