Hi TWIOF,
It's probably just a mini confussion with the terminology I have
chosen. You could create a component to handle the data or just
override the beforeRender method:
class app_controller extends controller { // or your controller if it's
not for all pages.
beforeRender() {
$listing = new Listing;
$stuff = $listing->findAll(null,null,"Listing.created DESC", 5);
$this->set("LatestListings",$stuff);
.. etc..
}
then in your layout/view/element you would refer to this variable as
$LatestListings to generate the html.
Using requestAction as you were, is in principle fine, but I would
guess that you noticed the ~2s render times, It's the equivalent
processing of loading 8 pages. If only for simplicity I would just put
the requestAction call directly in your view, as setting a variable
full of html (unless I am misunderstanding :) ) in the controller to
then pass to the view and echo seems like a couple of steps too many
;).
In anyevent glad you got it sorted,
AD7six
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---