问题
I want a view from another module to be rendered and I use path '//modulename/foldername/viewname'
(without .php
), but when I run it I get "Controller can't find the view" error. What do I do wrong? It used to work before. My version of Yii is 1.1.15.
EDIT: These is my urlManager:
'urlManager' => array(
'class' => 'yupe\components\urlManager\LangUrlManager',
'languageInPath' => true,
'langParam' => 'language',
'urlFormat' => 'path',
'showScriptName' => false,
'cacheID' => 'cache',
'rules' => array(
)
But how can it be related to my problem? Doesn't urlManager has nothing to do with view aliases?
回答1:
give it the full path to that file:
$this->render('application.modules.modulename.foldername.viewname' , $arrayData);
来源:https://stackoverflow.com/questions/25112374/controller-cant-find-the-view-in-yii