Код: Выделить всё
...
'layout' => 'base.twig',
'components' => [
...
'view' => [
'class' => 'yii\web\View',
'renderers' => [
'twig' => [
'class' => 'yii\twig\ViewRenderer',
'cachePath' => '@runtime/Twig/cache',
'options' => [
'debug' => true, // включаем дебаг
'auto_reload' => true // отключаем кэш
],
'extensions' => YII_DEBUG ? [
'\Twig_Extension_Debug',
] : [],
'globals' => [
'html' => '\yii\helpers\Html',
'url' => '\yii\helpers\Url',
'Yii' => '\Yii',
'GridView' => '\yii\grid\GridView',
],
'uses' => ['yii\bootstrap'],
'functions' => [
'dump' => '\yii\helpers\BaseVarDumper::dump',
],
],
],
],=
...
Код: Выделить всё
<div class="container">{% block fullContent %}{% endblock %}{#{{ this.blocks['fullContent'] }}#}</div>
Код: Выделить всё
{% extends "@app/views/layouts/base.twig" %}
{% block fullContent %}
wwww
{% endblock %}
{#{{ void(this.beginBlock('fullContent')) }}
<div class="row">
{{ dump(data) }}
#}{#<div class="col-md-4"></div>
<div class="col-md-4"></div>
<div class="col-md-4"></div>#}{#
</div>
{{ void(this.endBlock()) }}#}
Код: Выделить всё
A template that extends another one cannot have a body in "index.twig" at line 2.
ничего не выводит.
Что я не так делаю?!