AreaBlock editable not rendered using renderTemplate

I currently have a template which contains an areablock by calling the following:

<?= $this->areablock("test") ?>

I am trying to render this template in a controller action using

$this->renderTemplate(“template.html.php”)

the html and other php block render/execute just fine, but it simply will not render the areablock.

does anybody have any ideas?

Remove short open tag and use <?php echo $this->areablock("test") ?> ?

remove php and use twig: {{ pimcore_areablock('test') }}

PHP has been deprecated and will be removed with Symfony 5.

So, if you’re still in evaluation or testing stage, switch to twig in order to be future proof.

1 Like