Good morning.

I have to load the "latest 5 news" inside a div of an homepage. I
thought about making a function NewsController::last5() which could be
something like the following

  $this->data = $this->News->findAll(null,null,"News.created desc",5,1);
  $this->set("data",$this->data);

Now, I should have to load it in a div inside the homepage
(/pages/home.thtml). I thought about using an helper that load the
data using the previous function and render a div.

How can I better reach this result? Using an Helper? Using Ajax? And
how for both of them?

Thanks in advance
Davide

-- 
Live life like you're gonna die. Because you're gonna.
                                            William Shatner


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