0

登録、ログイン/ログアウト、ユーザー管理、パスワードの回復、アカウントの有効化など、アカウントに関するすべてを処理する「アカウント」モジュールを作成しています。

したがって、モジュールの DefaultController::actionRegister() が生成してメイン ページに表示するものは何でも再利用するのが最善だと考えました。

だから私の質問は: 任意のコントローラー (SiteController、読み取り: ビュー/レイアウト/main.php から、または別のコントローラー、最終的には別のサブモジュール) から新しい「サブリクエスト」(CController::forward() に類似) を作成する方法) 特定のモジュール/コントローラー/アクションに?

アプリケーション レイアウト内から $this->forward() を試しましたが、成功しませんでした。空白のページが表示され、エラーはまったくありません。

ありがとう

4

1 に答える 1

0

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.

于 2010-03-14T13:22:37.397 に答える