1
enter image description hereyii2(隐藏头,并使用adminLte左侧菜单)
大家好,我想问一下如何隐藏标题和左边的菜单在我的注册表格。我使用adminLte。当我打开登录时,标题和左侧菜单未显示。但是,当我去注册表单,标题和左侧菜单显示。请帮助我们。这里是我的main.php代码
enter code here
如果(的Yii :: $ APP->控制器 - >动作 - > ID === '登录'){
echo $this->render(
'main-login',
['content' => $content]
);
}其他{
if (Yii::$app->controller->action->id === 'register') {
backend\assets\AppAsset::register($this);
} else {
backend\assets\AppAsset::register($this);
}
dmstr\web\AdminLteAsset::register($this);
$directoryAsset = Yii::$app->assetManager->getPublishedUrl('@vendor/almasaeed2010/adminlte/dist');
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
<meta charset="<?= Yii::$app->charset ?>"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<?= Html::csrfMetaTags() ?>
<title><?= Html::encode($this->title) ?></title>
<?php $this->head() ?>
</head>
<!-- <body class="skin-blue sidebar-mini"> -->
<body class="<?= AdminLteHelper::skinClass() ?> fixed">
<?php $this->beginBody() ?>
<div class="wrapper">
<?= $this->render(
'header.php',
['directoryAsset' => $directoryAsset]
) ?>
<?= $this->render(
'left.php',
['directoryAsset' => $directoryAsset]
)
?>
<?= $this->render(
'content.php',
['content' => $content, 'directoryAsset' => $directoryAsset]
) ?>
</div>