On 10/03/2009, at 1:34 AM, Steven Southard wrote:
Comments are displayed on individual pages but I wanted to check
if there is a way to display recent comments in general (not just
the comments that belong to that page)?
This sounds pretty useful. When you figure it out please post back
how you did it. Also it seems a lot like how comments are handled
in the admin section.
I was thinking the same.... but I'm having some difficulties.
In the comments_controller, all the methods are linked to a certain
@page.
I added a method called recent but I am not sure how to test whether a
comment is approved or not. So, for now, I am finding all comments. I
also created a partial in views/comments/_recent.rhtml with the
following code:
<li>Posted <%= comment.created_at.to_formatted_s(:long) %> by</span> <
%= content_tag(:strong, link_to(comment.author, comment.author_url))
if comment.author_url %> on <strong><%= link_to(h(comment.page.title),
comment.page.url) %></strong></li>
So, my difficulties are:
1. I am not sure how to connect my partial to the actual radiant app
2. I am not sure how to select only approved comments.
Any ideas?
Thanks,
Elle
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant