Cannot Load View Without Mentioning Directory Name

Hi, i am new to YII. I am using ROUTING. Now the problem is that controller is not rendering the view without View directory name.

Here is the code

$this->render('users/signup', array('model'=>$model));

If i don’t embed directory name then it gives me error

"exception ‘CException’ with message 'SiteController cannot find the

requested view “signin-popup”.’ in


please guide me what wrong with it.?

The view for site controller should be placed in views/site.

Do you have a view named signin-popup in views/site?

yes it is in the directory. The problem is , if i mention "directory/file" then it loads view. Whereas if i only user view name then it generates error which is a default behavior of YII.

What do you mean for ROUTING?

First make sure you have following structure:










If you have that kind of structure we need to see your url rules.

I am following the same structure. But i have created a Theme instead of creating views in protected directory.

I think the issue is URL.

What i am trying to do is: When a user will complete membership form and login to site, then the url will be followed by his name.

Now the content displaying on that URL will be related to this URL. When a user will visit, he fill registeration form, visit or buy some products then the URL will be like this.

What i have done is that after user login, i have set the baseURL from


I think that is the reason that yii can’t find views?

if you think there is any other way to do this, please guide me?

The two issues are unrelated, if you don’t find the views has no relations with routing.

The view will be searched under the controllerId folder regardless the url.