View Single Post
  #6 (permalink)  
Old 04-03-2007, 09:28 PM
SpotSec's Avatar
SpotSec SpotSec is offline
Senior Member
 
Join Date: Feb 2007
Location: United States
Posts: 121
Default

Quote:
Originally Posted by asabi View Post
Well, I now understand the way forward works, it just changes the request parameters to point to the next controller.

What I really look for, is a way to do a 'sub' request, something along the lines of creating a new request, to another controller, dispatch it, and use the result inside the current controller.

I see a need for it for anything that needs to be repeated in multiple pages, like navigation for example.

So, instead of creating another view inside the controller, and render it, why not just call another controller action, which already creates the view, has all of the model calls and the call to render ...

I guess everything is a singleton when it comes to the front controller and the request object.

Again, do I have anything wrong in my thinking ?
This is my view, sub requests would not really fit well in as a controller action because an action should be treated as a whole page and not as a header or as a footer. As for 'sub requests' for headers/footers, including a header and footer in the view is just as effective and cleaner because all view content is contained within the view. Or you could just create a class to generate the header and view?
__________________
Zym Framework - A Zend Framework extension library w/ demo app

SpotSec Blog:
http://spotsec.com/blog
Reply With Quote