English 中文(简体)
Accessing a module s action rendered output
原标题:
  • 时间:2010-02-05 21:30:10
  •  标签:
  • yii

I m writing an "Account" module which should take care of everything about accounts: registration, login/logout, user administration, password recovery, account activation, etc.

So I thought it would be best to reuse whatever the module s DefaultController::actionRegister() generates to show on the main page.

So my question is: how to create a new "sub request" (similar to CController::forward()) from any controller (either SiteController, read: from views/layouts/main.php, or another controller, eventually of another submodule) to a given module/controller/action?

I ve tried with $this->forward() from within my application layout without success: it shows a blank page, no error whatsoever.

Thanks

最佳回答

You are trying to make a widget. Avoiding tightly coupled classes and actions will make your application more secure, easier to maintain and improve and far more reusable.

"Inline partial redirects" are never the answers to any question, at least in Yii.

问题回答

暂无回答




相关问题
how to change a model safe attributes in yii

I have a CActiveRecord model, and I need to change safe attributes list in that model. I have defined the safeAttributes method inside my model, like the following : public function safeAttributes() {...

Accessing a module s action rendered output

I m writing an "Account" module which should take care of everything about accounts: registration, login/logout, user administration, password recovery, account activation, etc. So I thought it would ...

yii components: events and behaviors?

i m currently learning the yii framework and have read their documentation. but i still don t understand the components. what are these. they talk about component events and behaviors. could someone ...

Yii: Customize the results of CAutoComplete

I need to make a dropdown list using CAutoComplete. Everything is set and works fine, here is my code of the action: <?php public function actionSuggestCharacter() { if(Yii::app()->...

热门标签