【发布时间】:2013-08-16 19:21:36
【问题描述】:
只是想知道我需要做什么才能访问我的 SiteController 类中的模块视图以呈现该视图而不是索引视图。我想访问在protected/modules/account/views/account/register.php 中找到的视图。我知道我需要在我的SiteController::actionIndex class::method:$this->render('index', array('model' => $model)); 中更改这一行。但我不确定我需要放什么才能访问模块的视图。我试过'account/views/account/register,但我得到了这个例外:CException SiteController cannot find the requested view "account\views\account\register"
感谢您提供的任何帮助或指导
【问题讨论】:
-
你检查手册的模块部分了吗?
-
请注意,如果您必须做这种事情,这通常是设计不太好的标志。模块应该是自包含的。永远不需要从外部访问模块视图。
标签: php templates yii scope yii-modules