yiisoft/yii2 — pull request #3907 by cansozeri (2014-06-16 18:45:04+00:00)
Title: Update ViewRenderer.php

I want to use my layouts in a different folder that calls base or main layout in project and use them every twig files that can be extended.

views
| site
|index.htm
| layouts
|main.htm

Now If I call render like this I can not extend main.htm, because it is not in site view folder, it is in the layouts folder.

public function actionIndex()
{

return $this->render('index.htm');
}

http://stackoverflow.com/questions/24247569/twig-template-layout-yii2-framework

So I change the file and now I can define layouts folder with Twig_Loader_Filesystem and after that in function render, I can addPath my file folder path site/index.htm .. so twig search the files in two folders - layouts and site folders. If you want we can change the $define_layout as an array and from config file we can send more than one folders that can twig search for. If there is another simple way to do this I would be very happy to learn how can I do this ..

Regards,