plz help for error: cannot find the requested view

Hi,

Please could anyone help on the following error? ‘PostController cannot find the requested view “searchResult”’.

In the protected/controllers path, i have:

SiteController

PostController

While the siteController executes successfully the code in the actionSearch method:




 $this->render('searchResult',array(       'result'=>$items,'items_feedbacks_count'=>$item_feedbacks_count,'stars'=>$feedback_images,'txtSearchLabel'=>$txtSearchLabel,'model'=>$model,));



The same code generates the error 'PostController cannot find the requested view “searchResult” when executed in the actionSearch method of the PostController.

Any ideas?

Thanks!

Do you also have ‘searchResult’ view in ‘protected/views/post/’ directory?

If you only want to access ‘searchResult’ view in in ‘protected/views/site/’ directory, you may need to change path when rendering view (in PostController):




$this->render('/site/searchResult',array(...));



i am also facing the same problem please help me…

"UploadPicturesController cannot find the requested view "DisplayPictures". "

it is coming to the action of the view but not able it to the view

Any idea?

Thanks in Adavance

Solved for displaying the view you can try the follwing link for rendering

it is worked for me.

$this->render(‘application.modules.modulename.views.View.ViewNametobedisplay’,array(‘model’=>$model));