在子类中渲染父类视图

MY LoginController class is extended from UserController. I want to ovverride one method of UserController. Everything works fine but $this->render('index') call the view of child class. I want to call the view of parent class. I have tried using parent::render('index') but taht dodn't work too. Here is my code

<?php
namespace frontend\controllers;
use Yii;
use mdm\admin\models\form\Login;
use mdm\admin\models\form\PasswordResetRequest;
use mdm\admin\models\form\ResetPassword;
use mdm\admin\models\form\Signup;
use mdm\admin\models\form\ChangePassword;
use mdm\admin\models\User;
use mdm\admin\models\searchs\User as UserSearch;
use yii\web\Controller;
use yii\filters\VerbFilter;
use yii\filters\AccessControl;
use yii\web\NotFoundHttpException;
use yii\base\UserException;
use yii\mail\BaseMailer;
use mdm\admin\controllers\UserController;

class LoginController extends UserController
{

   public function actionLogin()
    {
        //parent::actionLogin();
        if (!Yii::$app->getUser()->isGuest) {
            return $this->goHome();
        }

        $model = new Login();
        if ($model->load(Yii::$app->getRequest()->post()) && $model->login()) {
            return $this->goBack();
        } else {
            return parent::render('login', [
                    'model' => $model,
            ]);
        }
    }
}

The error i am getting is enter image description here

But my opinion is that it should call the parent class view instead of looking it in child class. What am i missing here?

From the Yii 2 Guide:

If the view name starts with a single slash /, the view file path is formed by prefixing the view name with the view path of the currently active module. If there is no active module, @app/views/ViewName will be used. For example, /user/create will be resolved into @app/modules/user/views/user/create.php, if the currently active module is user. If there is no active module, the view file path would be @app/views/user/create.php.

So use:

return $this->render('@mdm/admin/views/user/login', ['model' => $model]);

the view normally are not organized by class .. so you should call the view you need ..

eg for login view

     return $this::render('login', [
                'model' => $model,
        ]);

or for another view name named: my_new_view_login in (views/your_controller/my_new_view_login.php)

        return $this::render('my_new_view_login', [
                'model' => $model,
        ]);

You need to use a full path to view file. If it's an extension, use path from alias

return $this->render('@mdm/admin/views/user/login', ['model' => $model]);