controller cannot find the requested view module - Yii [solved]

Practice




I do $this->render('searcht',array( 'result'=>$item,'model'=>$model,));

but I get an error
MyController cannot find the requested view "search"

$this->render('main');


this call looks for the file protected/views/site/main.php

if you're not using the main application but a module, you need to specify the full path to the view
$this->render('application.modules.moduleName.views.View.viewName',array('model'=>$model));

thanks

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Famworks"

Terms: Famworks