I've got some comments that belong to some posts. In the post listning I want to show how many comments a particular post has got. How do I do that?
This is what I've got so far in the controller:
$this->posts = $this->Post->find('all', $this->pagination_helper->getFindOptions($this->Post),
array('include' => array('category', 'comments')));
Thanks in advance!
in {loop Posts}
<?= count($Post->comments) ?>
or:
<?= $Post->comment->count() ?>
BTW
$this->Post->find('all', $this->pagination_helper->getFindOptions($this->Post),
array('include' => array('category', 'comments')));
shouldnt work.
I said array_merge in my post ;-)
1 to 3 of 3