Hello  CakePHP GG,

I am stumped and hoping someone could help out a confused newbie.

Background:
I'm building a blog out of cake stable. I've got MVC setup for post,
categories, and comments. I've got a one to many relationship between
post -> comments and a HABTM relationship between post <-> categories.

Problem:
How would I go about showing the number of comments for each post for
when I browse by category. example: /blog_categories/view/3

I did the following when browsing the main blog, /blog/index, with the
following:

View:
<?php $comment_count = count($post['Comment']); ?>
<?php echo $html->link("Comments: ".$comment_count." >>", '/blogs/
view/'.$post['Blogs']['id'].'#comments') ?>

I hope I'm clear. Thanks.


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to