Change the current active controller

[tt]

Hello everybody,

Is there way to change the current active controller in Yii? When I tried to change the default SiteController with the one present in extensions using :



      Yii::app()->controller = 'application.extensions.employee.EmployeeController';


[tt]

it throws the exception as :

    Property "CWebApplication.controller" is read only.

Any suggestions? Thanks! ::)

[/tt]

Could you explain why would you do so? What is your extension?

Hello Qiang,

I have already asked this question in other topic at:

http://www.yiiframew…opic,438.0.html

Actually I want to create an extension which can interact with database and which can be used with any other views. I want to change the controller because the default 'SiteController' can not find the views which are present in the extension.

Thanks!