Multiple views to one controller

Dear friends,

With Gii, I can generate a login view(a form, login.php ), and loginAction() in controller, and they are also generated and mapped together.

But I want to enable user to login not just in a form, but also on the header bar, and by clicking on a link to pop up a small box, like here:

Is there a way to for this "multiple view to one controller action" solution possible in Yii? How?



the popup you can find out how to do in this wiki

the header can be done if you read the code of this widget, is a bit old but works

These two tools look difficult, using them is beyond my capability at this moment. How about this solution:

create two actions login1Action() and login2Action() in controller, when render the view, use these command $this->render(‘UserLogin1’,array(‘form’=>$form)) in login1Action(), and $this->render(‘UserLogin2’,array(‘form’=>$form)) in login2Action()

In userlogin1.php and userlogin2.php, I can control how and position the form is displayed.

Do you think this will work?