Yii Framework Forum: Accessing a module's action rendered output - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Accessing a module's action rendered output Rate Topic: -----

#1 User is offline   OriginalCopy 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 13-March 09

Posted 05 February 2010 - 04:28 PM

Hi.

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
0

#2 User is offline   Y!! 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 978
  • Joined: 18-June 09

Posted 05 February 2010 - 04:46 PM

Are you using latest Yii version from svn? Because CController::forward() was changed recently so that the application exits after the forward call. You can use forward($route, false) so that the application doesn't exit after the call.
0

#3 User is offline   OriginalCopy 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 13-March 09

Posted 05 February 2010 - 04:59 PM

No, I'm using yii-1.1.0.r1700. And even so, as I said all I get is a blank page, even though I'm calling forward() inside my main application's layout (at a point where IF something would crash or return/stop execution, I'd still have SOME output).

And when I say "blank" I mean the HTTP response body, not what I can see drawn in the canvas. It's like it'd die of endless recursion or something, purely on how it behaves.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users