How Can I Show The Default Login Page As Modal Popup In Yii2?

Hi,

Can anybody please tell me how can i raise the default login page as model popup in yii2?

Thanks

Solved it finally.

How did you solve it? (Could be useful for other people if they come across this thread)

Sure i am providing my code here.

Hi,

Where should I put this code? in layout/main.php or anywhere else?

Thank you.

How I can make a link for show this modal?

I am also interested in this. I believe you cannot put in views/layouts/main.php, since in layout you cannot add a model. You should create a widget in yii 1.1, but I am not sure how can you make a widget in yii2? I am new to yii2.

https://github.com/shi-yang/yii2-login-widget <-- is example of widget, but need to change it to modal popup, anyone can help to proceed?

Daniel