/** * * Figures out which partial to use. * * We overwrite this method to make sure that we can use something like this in our partial: * * partialPath = EXT:pt_extbase/Resources/Private/Partials/Filter/StringFilter.html * * @param string $partialName The name of the partial * @return string the full path which should be used. The path definitely exists. * @throws InvalidTemplateResourceException */ protected function getPartialPathAndFilename($partialName) { if (file_exists($partialName)) { // partial is given as absolute path (rather unusual :-) ) return $partialName; } elseif (file_exists(GeneralUtility::getFileAbsFileName($partialName))) { // partial is given as EXT:pt_extbase/Resources/Private/Partials/Filter/StringFilter.html return GeneralUtility::getFileAbsFileName($partialName); } else { if (method_exists('\\TYPO3\\CMS\\Fluid\\View\\TemplateView', 'getPartialPathAndFilename')) { return parent::getPartialPathAndFilename($partialName); // this method only exists in 1.4.0 } else { return $partialName; } } }