Commit 5d3982e4 by Alexander Makarov

Fixes #5528: added auto_reload to default twig config in both extension readme…

Fixes #5528: added auto_reload to default twig config in both extension readme and template engines chapter in docs
parent 2e4db55c
...@@ -21,8 +21,11 @@ component's behavior: ...@@ -21,8 +21,11 @@ component's behavior:
], ],
'twig' => [ 'twig' => [
'class' => 'yii\twig\ViewRenderer', 'class' => 'yii\twig\ViewRenderer',
//'cachePath' => '@runtime/Twig/cache', 'cachePath' => '@runtime/Twig/cache',
//'options' => [], /* Array of twig options */ // Array of twig options:
'options' => [
'auto_reload' => true,
],
'globals' => ['html' => '\yii\helpers\Html'], 'globals' => ['html' => '\yii\helpers\Html'],
'uses' => ['yii\bootstrap'], 'uses' => ['yii\bootstrap'],
], ],
......
...@@ -14,8 +14,11 @@ return [ ...@@ -14,8 +14,11 @@ return [
'twig' => [ 'twig' => [
'class' => 'yii\twig\ViewRenderer', 'class' => 'yii\twig\ViewRenderer',
// set cachePath to false in order to disable template caching // set cachePath to false in order to disable template caching
//'cachePath' => '@runtime/Twig/cache', 'cachePath' => '@runtime/Twig/cache',
//'options' => [], /* Array of twig options */ // Array of twig options:
'options' => [
'auto_reload' => true,
],
// ... see ViewRenderer for more options // ... see ViewRenderer for more options
], ],
], ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment