N°2847 - Fix content parameters (eg. aPage) not passed in subblocks

This commit is contained in:
Molkobain
2020-08-06 17:07:08 +02:00
parent 6666f3d033
commit 1e3771dffa
5 changed files with 26 additions and 20 deletions

View File

@@ -150,8 +150,8 @@ class Extension
// Function to render a UI block (HTML, inline CSS, inline JS) and its sub blocks directly in the TWIG
// Usage in twig: {{ render_block(oBlock) }}
/** @since 2.8.0 */
$oTwigEnv->addFunction(new Twig_SimpleFunction('render_block', function(iUIBlock $oBlock){
return BlockRenderer::RenderBlockTemplates($oBlock);
$oTwigEnv->addFunction(new Twig_SimpleFunction('render_block', function(iUIBlock $oBlock, $aContextParams = []){
return BlockRenderer::RenderBlockTemplates($oBlock, $aContextParams);
}, ['is_safe' => ['html']]));
}