Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-05-2008, 01:32 PM
Junior Member
 
Join Date: Jul 2008
Posts: 6
Default Calling a controller from a controller?

In the ErrorController there is an occasion where I want to bring the user back to the index page. I need to execute the index controller to that page and not try to render it's view within the ErrorController because none of the model data is present then, since it's in the indexcontroller. I want to also set a variable in that view, so if I use the redirect helper, I don't think I am able to affect the view that is subsequently rendered, right? So how can I call the index controller and set a view variable for it from another controller?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 08-05-2008, 02:55 PM
gog gog is offline
Junior Member
 
Join Date: Jul 2008
Posts: 8
Default

I am not sure I understood everything you sad, but you can use the redirector and the Flashmessenger to pass some data.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-15-2008, 05:31 AM
Junior Member
 
Join Date: Aug 2008
Posts: 3
Default Can controller from another controller

Guys, I have similar problem
From a controller I need to prepare an e-mail body and send e-mail.
I have a standard template for e-mails but text can differ that's why I want to use layouts for it.

renderScript - doesn't work here because the output content is appened to response

I tried to create new controller for rendering of my e-mail, however the problem is that its constructor requires Request and Response. If I pass them from current controller and then change script paths for new controller, it influents script paths of current controller also.

Would you please recommend me some working solution.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:01 AM.