Skip to content

Commit 56ea995

Browse files
committed
fix
1 parent f7caf5a commit 56ea995

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/Module.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ public function init()
3030
// 'baseUrl' => '@web/themes/adminlte',
3131
]);
3232

33+
if ($this->theme == 'adminlteiframe') {
34+
$this->defaultRoute = 'adminlteiframe/layout'; // for adminlteiframe theme
35+
$this->controllerMap['adminlteiframe'] = [ // for adminlteiframe theme
36+
'class' => 'myzero1\adminlteiframe\controllers\SiteController'
37+
];
38+
}
39+
3340
// \Yii::$app->layoutPath = '@vendor/myzero1/yii2-theme-adminlteiframe/src/views/'.$this->theme.'/layouts';
3441
// \Yii::$app->layout = 'main'; // default
3542

src/controllers/DefaultController.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@ class DefaultController extends Controller
1515
*/
1616
public function actionIndex()
1717
{
18-
// $this->layout = 'layout'; // using the view of module
19-
if ($this->module->theme == 'adminlteiframe') {
20-
$this->layout = '//layout'; // using the view of app
21-
}
2218
return $this->render('index'); // using the view of module
23-
// return $this->render('//index'); // using the view of app
2419
}
2520

2621
/**

0 commit comments

Comments
 (0)