Many thanks for the suggestion, I'd heard of requestAction but had
also heard that it wasn't recommended, so assumed there must be an
easier way as so many sites seem to combine elements.

I'll give it a try anyway - as you say, it will be good for learning
as I'm just starting out so I could always try a different way later
(and when I've got an app up and running to ask for suggestions on!).

Cheers,
Jon.

On Dec 2, 2007 11:28 PM, the_woodsman <[EMAIL PROTECTED]> wrote:
>
> 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!

--~--~---------~--~----~------------~-------~--~----~
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