[BUGFIX] Respect format when rendering partial
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Classes / View / AbstractTemplateView.php
index 70e05a8..7ace7eb 100644 (file)
@@ -253,10 +253,11 @@ abstract class AbstractTemplateView implements \TYPO3\CMS\Extbase\Mvc\View\ViewI
         * @return string
         */
        public function renderPartial($partialName, $sectionName, array $variables) {
-               if (!isset($this->partialIdentifierCache[$partialName])) {
-                       $this->partialIdentifierCache[$partialName] = $this->getPartialIdentifier($partialName);
+               $partialNameWithFormat = $partialName . '.' . $this->controllerContext->getRequest()->getFormat();
+               if (!isset($this->partialIdentifierCache[$partialNameWithFormat])) {
+                       $this->partialIdentifierCache[$partialNameWithFormat] = $this->getPartialIdentifier($partialName);
                }
-               $partialIdentifier = $this->partialIdentifierCache[$partialName];
+               $partialIdentifier = $this->partialIdentifierCache[$partialNameWithFormat];
 
                if ($this->templateCompiler->has($partialIdentifier)) {
                        $parsedPartial = $this->templateCompiler->get($partialIdentifier);