Open strtob opened 3 years ago
I try to answer Have you try change your login view in folder views/site/login? Or you mean something else?
Great! Currently, I have my own theme configured in components > view >theme > pathMap > @app/view
I want to change the view which appears in url /admin/user/login this use @vender/mdmsoft/yii2-admin/views/user/login
If I try /site/login the error "Incorrect username password" appears.
How can I use my own view or make this working with the yii2-admin module? :-/
A further questition: Is it possible to make a difference in the used layout file between guests and users?
Update, if anybody helps to change default view:
'on beforeRequest' => function ($event) { Yii::$app->layout = Yii::$app->user->isGuest ? '@app/themes/adminlte3/layouts/main-login.php' : // or just use 'GuestUser' and '@app/themes/adminlte3/layouts/layouts/main.php'; // 'RegisteredUser' since the path // and the extension are used by // default },
but problem 'incorrect username password' still exist / I need to route the request to yii2-admin controller
Hi guys,
Maybe it's a stupid question, a short answer would be helpful, nevertheless...
I want to you use my own login view - what I have change in the config?
Thanks a lot! Toby