amnah / yii2-user

Yii2 user authentication module
MIT License
253 stars 104 forks source link

How to customise views #185

Open p2made opened 7 years ago

p2made commented 7 years ago

I may be suffereing an attack of the stupids, but I can't figure for the life of me how to customise the views & forms. I gues it starts with copying them to the views folders (I'm using Yii2 Advanced) of my Yii app. How to I tell my installation of yii2-user to use my custom views & forms?

amnah commented 7 years ago

You have to update the components view config.

Note that this example is for the basic app; you'll need to change the paths for your advanced app.

// app/config/web.php
'components' => [
    'view' => [
        'theme' => [
            'pathMap' => [
                '@vendor/amnah/yii2-user/views' => '@app/views/user', // example: @app/views/user/default/login.php
            ],
        ],
    ],
],