I have created the module ‘admin’. This module has 2 files inside the layouts folder: login.php and admin.php. Now I have a working login page with the right layout(login.php).
Inside the admin module I have created a submodule called ‘dashboard’.
After the login I redirect the user to the dashboard submodule:
public function actionIndex()
{
// check if the user is logged in
if(Yii::app()->user->isGuest)
{
$this->redirect(array('login'));
}
else
{
$this->redirect(array('dashboard'));
}
}
Now I want to have all submodules inside the ‘admin’ module to have the admin.php layout. How do I get this working?