You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But {contentVariable} is always null.
After some debugging I found the troublemaker: \TYPO3Fluid\Fluid\View\AbstractTemplateView and exactly this part:
if ($this->getCurrentRenderingType() === self::RENDERING_LAYOUT) {
// in case we render a layout right now, we will render a section inside a TEMPLATE.$renderingTypeOnNextLevel = self::RENDERING_TEMPLATE;
} else {
$renderingContext = clone $renderingContext;
$renderingContext->setVariableProvider($renderingContext->getVariableProvider()->getScopeCopy($variables));
$renderingTypeOnNextLevel = $this->getCurrentRenderingType();
}
So, no variables are passed in case of rendering section inside of layout. If I simply add $renderingContext->setVariableProvider($renderingContext->getVariableProvider()->getScopeCopy($variables)); in if-section, everything works as expected.
The question: is it bug or made for purpose so?
The text was updated successfully, but these errors were encountered:
Hi,
I wanted to utilize the feature, which makes it possible to use sections as wrappers.
Here is my
Layouts/Default.html
:Templates/Main.html
But
{contentVariable}
is alwaysnull
.After some debugging I found the troublemaker:
\TYPO3Fluid\Fluid\View\AbstractTemplateView
and exactly this part:So, no variables are passed in case of rendering section inside of layout. If I simply add
$renderingContext->setVariableProvider($renderingContext->getVariableProvider()->getScopeCopy($variables));
in if-section, everything works as expected.The question: is it bug or made for purpose so?
The text was updated successfully, but these errors were encountered: