Hi Brandags,

T tried what you suggested, but it seems that $data isn't defined at
all. (Notice: Undefined variable: data in
D:\wamp\www\europassur\app\controllers\sheets_controller.php on line
22)

Here is the "complete code"

== Controller

$this->RecentPapers->controller = &$this;
$this->RecentPapers->init();
pr($data);
== Component

<?php
class RecentPapersComponent extends Object
{
        var $name = 'RecentPapers';
        var $controller = true;

        function init ($number = 5)
        {
                $Paper = new Paper;
                $data = $Paper->findAll         (
                                                                null,
                                                                null,
                                                                'Paper.modified 
DESC',
                                                                $number
                                                        );
                $this->controller->set('recentpapers',$data);
        }
}
?>

== view

<?php foreach ($recentpapers as $paper): ?>
<?php endforeach; ?>

Thanks a lot for the attention


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

Reply via email to