I am sorry for the basic question.. but here goes.

I will use Blog Posts as an Example

I have the following models:

Author
Post
Tags

All the associations are fine as the scaffold pages are working
without a problem.

I have a page under the Author Controller the standard view:

function view($id = null) {
                if (!$id) {
                        $this->Session->setFlash(__('Invalid Author', true));
                        $this->redirect(array('action' => 'index'));
                }
                $this->set('author', $this->Post->read(null, $id))
        }

In my view.ctp

I want to show the author, all his/her posts and individual tags.

I can easily show all the posts, but how do I get the individual tags?

IE:

echo $author->['Author']['name']; //good

foreach ($author['Post'] as $post):
print_r(post); //good

How would I get all the tags for that specific post?


Goal:
Open http://localhost/authors/view/3

AUTHOR:  DUDE #3
Post  5 - Tags (OPEN, IT)
Post 10 - Tags (IT)
Post 11 - Tags (Open)

Thanks!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to