public setTemplatePathAndFilename ( string $templatePathAndFilename ) : void | ||
$templatePathAndFilename | string | Fluid template path |
리턴 | void |
public function setTemplatePathAndFilename($templatePathAndFilename)
{
$this->baseRenderingContext->getTemplatePaths()->setTemplatePathAndFilename($templatePathAndFilename);
$partialRootPaths = $this->baseRenderingContext->getTemplatePaths()->getPartialRootPaths();
$layoutRootPaths = $this->baseRenderingContext->getTemplatePaths()->getLayoutRootPaths();
array_unshift($partialRootPaths, Files::concatenatePaths([dirname($templatePathAndFilename), 'Partials']));
array_unshift($layoutRootPaths, Files::concatenatePaths([dirname($templatePathAndFilename), 'Layouts']));
$this->baseRenderingContext->getTemplatePaths()->setPartialRootPaths($partialRootPaths);
$this->baseRenderingContext->getTemplatePaths()->setLayoutRootPaths($layoutRootPaths);
}
/** * Prepare a Fluid view for rendering an error page with the Neos backend * * @return StandaloneView */ protected function prepareFluidView() { $fluidView = new StandaloneView(); $fluidView->setControllerContext($this->runtime->getControllerContext()); $fluidView->setFormat('html'); $fluidView->setTemplatePathAndFilename('resource://Neos.Neos/Private/Templates/Error/NeosBackendMessage.html'); $fluidView->setLayoutRootPath('resource://Neos.Neos/Private/Layouts/'); // FIXME find a better way than using templates as partials $fluidView->setPartialRootPath('resource://Neos.Neos/Private/Templates/TypoScriptObjects/'); return $fluidView; }