Код: Выделить всё
<?php $this->beginContent('@backend/views/layouts/main.php');
echo $content;
$this->endContent(); ?>
Код: Выделить всё
<?php $this->beginContent('@backend/views/layouts/main.php');
echo $content;
$this->endContent(); ?>
Код: Выделить всё
<?php $this->beginContent('@backend/views/layouts/common.php');
echo $content;
$this->endContent(); ?>
Код: Выделить всё
<!DOCTYPE html>
<head>
</head>
<body>
<?php $this->beginBody(); ?>
<?php echo $content ?>
<?php $this->endBody(); ?>
</body>
</html>
Код: Выделить всё
main1.php
<?php $this->beginContent('@backend/views/layouts/common.php');
<h1>Это шаблон 1</h1>
echo $content;
$this->endContent(); ?>
Код: Выделить всё
main2.php
<?php $this->beginContent('@backend/views/layouts/common.php');
<h1>Это шаблон 2</h1>
echo $content;
$this->endContent(); ?>
Код: Выделить всё
common.php
<!DOCTYPE html>
<head>
</head>
<body>
<?php $this->beginBody(); ?>
<?php echo $content ?>
<?php $this->endBody(); ?>
</body>
</html>