Hello I am trying to use the containable behavior in a category
controller that habtm posts. In the view action of the category
controller I am trying to display all posts for the category and also
all of the posts categories.

Here is what I am trying to use:

$this->Category->contain(array('Post' => array('User.name',
'Category')));

But I still cannot get the categories for the post.

If I do something like the following in the category view action I do
get the categories for the post but I also get all the posts and not
just the ones tied to the category:

$this->Category->Post->contain(array('User.name', 'Category.name'));
pr($this->Category->Post->findAll());

Any help would be greatly appreciated.
Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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