url type error: How to prevent the Adminlte Asset layout render? i.e: http://backend.test/hfffhfhf
jolierouge opened this issue · 2 comments
jolierouge commented
url type error: How to prevent the Adminlte Asset layout render? i.e: http://backend.test/hfffhfhf
Kind Regards,
githubjeka commented
['layout' => '//empty',]
public function actionError()
{
$action = new \yii\web\ErrorAction($this->id, $this, ['layout' => '//empty',]);
$exception = Yii::$app->errorHandler->exception;
if ($exception instanceof \yii\web\BadRequestHttpException) {
$action->view = 'errorCsrf';
} elseif ($exception instanceof \yii\web\HttpException) {
$action->view = 'error';
} else {
$action->view = 'error500';
}
return $action->run();
}
empty.php
<?php
use backend\assets\AppAsset;
use backend\widgets\Alert;
/* @var $this \yii\web\View */
/* @var $content string */
$asset = AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="ru">
<?= $this->render('_head') ?>
<body>
<?php $this->beginBody() ?>
<?= Alert::widget() ?>
<?= $content ?>
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
jolierouge commented