yii 如何render其他controller对应的view
比如我现在在BlogController.php中render一个/ChatController对应的view:/chat/index.view,可以这么写:
<?php $this->render('//chat/index',array('model'=>$model))?>
?
?关键就是"//"(Using single slash “/” will start the searched from the current active module’s view path instead, and falls back the search in the application’s view path.)
?
参考: http://tipstank.com/2010/07/14/how-to-renderpartial-a-file-in-another-controllers-view-folder-for-yii/