another option that I feel gives more flexibility is this

http://bakery.cakephp.org/articles/view/creating-reusable-elements-with-requestaction

so you end up writing lot of small elements and use views to compose
these elements. However you will need to also consider how
requestAction is affecting response time of the website. In my
experience, if it something that can be cached or an information panel
that gets placed on lot of different pages, then going for element
with requestAction option is a good way. To avoid requestAction, you
can pass data to element using the approach mentioned by McFadly.

FYI: checkout this webpage : http://findnwrite.com/memento

Here I have three different elements working together: "New Users",
"Recent Articles", and "Reports". I use elements to build this webpage
but since they do not change a lot, I cache them to reduce number of
databaes queries

Enjoy
Ritesh




On Sep 15, 12:31 am, McFadly <[EMAIL PROTECTED]> wrote:
> Ryan,
> This is a pretty standard question from people just getting started,
> so don't worry.
>
> The simple answer is in your controller, add the variable:
>
> $uses = array('Post, 'Comment');
>
> You can then access both $this->Post->save(); and $this->Comment->save(); 
> from that controller.  Of course any model function is
>
> accessible, not just save()
>
> Hope that helps.
>
> On Sep 14, 5:39 pm, nryan <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello everyone,
>
> > I've been working with Cake and I understand exactly how everything
> > works to create pages which are tied to one particular action with one
> > particular model.
>
> > However, I am building a web application which requires pages that can
> > perform multiple actions on multiple models, depending on requests
> > from the user. And it's not clear to me the "right way" to do this
> > with Cake.
>
> > Can someone give me an example or perhaps point me to documentation
> > that discusses this? Perhaps I have missed it but I don't think this
> > topic is specifically addressed in the docs.
>
> > thank you,
> > ryan- Hide quoted text -
>
> - Show quoted text -


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

Reply via email to