Here's my interpretation of your question....

The simplest way to do this is to call requestAction directly from
your view; allowing you to retrieve other views and combine them in
one page.

Continuing with your example of the Snook page, you might build it
something like this:

- The main content would be retrieved by calling requestAction on some
method in the controller responsible for posts, with whatever
parameters it takes to get them by category.

- In the left hand panel, the about text might be static on the page.

- the get email updates form might be a call to requestAction to run
an action in the controller responsible for subscribed users.

- The books might be retrieved by a requestAction call to index() of
the books controller.

Hope that makes some sense!!

You can also call request action in controllers, and collect the
pieces of your page in your controller, before passing them onto your
view.

Bear in mind however that, to my knowledge, excessive direct use of
requestAction isnt considered best practice.

I think theres an article in the bakery on using Elements to achieve a
similar effect (and I think that article is linked from the FAQ).

However, using requestAction like this might be a good intro to how it
all works.

And of course, if you want to add loads of mini forms on these
composite pages, Ajax might be a nice finishing touch.

Enjoy!


On Dec 2, 7:55 pm, ldb <[EMAIL PROTECTED]> wrote:
> G'day
>
> Would the Ajax helper be what you are looking for, or have I
> misunderstood? I did visit your link..........;-)
>
> On Dec 2, 5:15 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi everyone,
> > Apologies if this is a silly question, I'm brand new to Cake (and
> > frameworks in general!).
>
> > Every tutorial under the sun shows you how to make a view with another
> > page for editing, another page for adding etc., but nobody seems to be
> > able to show an example of an everyday web page, with lots of
> > different dynamic systems built into a single page.
>
> > I'm thinking of how you'd extend a site wirh a basic layout that looks
> > like this one:http://www.snook.ca/archives/cakephp
>
> > Presumably all the ads, book lists and things come from included
> > elements - I've got that far, but how to make these dynamic? What if I
> > wanted the left nav to be a list of users, with Edit and Delete links
> > next to their names, while the main content panel gives me my editable
> > list of articles. And what if at the bottom of the page I wanted to
> > display my CD list?
>
> > I can build a full class for music, articles and users, and they can
> > work fine seperately (one view for listing my music, in the music
> > folder, another view for editing my articles, in the articles folder
> > etc.), but how does one combine them into a single view? I just can't
> > see what you're supposed to do to combine lots of interactions into a
> > single page, and where you're supposed to put view files with multiple
> > functionality. If someone can explain, or point me to a tutorial, I'd
> > be most grateful!
>
> > Jon.- 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 cake-php@googlegroups.com
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