data and views

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

data and views

jamdown

Hi:

I'm new to cake and need a bit of help.

Here's my problem, I have 2 actions, action A and action B. Action A
does a bit of magic and creates an array which is passed to its view.
Now, action B needs to pass that same array to its view as well.
However, action B only needs this array when a link located on action
A's view is clicked. The array could get very large, so breaking up and
sending as URL params back to B is not an option.

I'm sure this is easy enough, but i'm just not seeing it. Any help will
be appreciated.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: data and views

Eric C Blount
Do the "bit of magic" in another method in the controller which returns the array. Call the method from each action. And if the array is based on data from a specific model, you should probably put the new function in that model.
 
Eric

 
On 10/31/06, jamdown <[hidden email]> wrote:

Hi:

I'm new to cake and need a bit of help.

Here's my problem, I have 2 actions, action A and action B. Action A
does a bit of magic and creates an array which is passed to its view.
Now, action B needs to pass that same array to its view as well.
However, action B only needs this array when a link located on action
A's view is clicked. The array could get very large, so breaking up and
sending as URL params back to B is not an option.

I'm sure this is easy enough, but i'm just not seeing it. Any help will
be appreciated.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Loading...