yii2-user icon indicating copy to clipboard operation
yii2-user copied to clipboard

How to customise views

Open p2made opened this issue 7 years ago • 1 comments

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?

p2made avatar Mar 22 '17 14:03 p2made

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
            ],
        ],
    ],
],

amnah avatar Mar 22 '17 14:03 amnah