Yii2 layout

can anyone help me? It’s possible to set aside content dynamically on every page rendering. everything that i had read just show me a static text or a widget that the content should not change. But i want the content on aside depending on on the main content. is there any way good of doing this? This is the column file content




<?php /* @var $this Controller */ ?>

<?php $this->beginContent('../layouts/main.php'); ?>

 

<div class="grid_4 alpha">

    <div class="sidebar">&nbsp;

    <?php echo $content_left ?>

    </div>

</div>

 

<div class="grid_9"> 

 

    <div id="content">

        <?php echo $content; ?>

    </div>

</div>

 

<div class="grid_3 omega">

    <div class="sidebar">&nbsp;

    <?php echo $content_aside ?>

    </div>

</div>

 

<?php $this->endContent(); ?>



It’s possible to set $content_left and $content_aside like this ? if yes how and where can i do it?

Thank you !

Hi, try using blocks

http://www.yiiframework.com/doc-2.0/guide-structure-views.html#using-blocks

@ Rom, I already found blocks and i used it already !!!

Thank you for your time !