I successfully made it to display the lists of posts using
app/views/posts/index.thtml

Then the next step is add to the controller:
    function view($id)
    {
        $this->Post->id = $id;
        $this->set( 'data', $this->Post->read() );
    }

And then add the view.thtml  and then try the url

http://127.0.0.1:8080/cake/posts/view/2

The result is I get Notices that:
Notice: Undefined variable: data in
c:\server\server\apache\htdocs\cake\app\views\posts\view.thtml on line
1

Created:
Notice: Undefined variable: data in
c:\server\server\apache\htdocs\cake\app\views\posts\view.thtml on line
3

Notice: Undefined variable: data in
c:\server\server\apache\htdocs\cake\app\views\posts\view.thtml on line
6

So why isn't 'data' getting set for the read() but seems OK for the
findAll() ??


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