Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I am thinking if it is possible to use views to list out only a 1 latest comment from each node type.
Currently, what it seems to be doing is only to list only the X latest comments a node type.
Thanks.
Comments
Comment #1
CobraMP CreditAttribution: CobraMP commentedI was looking for this. Currently my view will show duplicate rows due to multiple comments. Another resolution would be a way to merge the comments into one field.
Comment #2
dawehnerdid you tryed out http://drupal.org/project/views_groupby
this enables group by contentyp, it could be a solution, but i'm not sure at the moment
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedThis is almost impossible to do in just one query, and as such is something Views can't support.
Comment #4
scalp CreditAttribution: scalp commentedSorry to bring an old thread to life, but it's the closest I've found to addressing my issue. Does anyone know if it would be possible to address this issue by limiting the way Drupal core outputs those comments? It seems as though when a row style of node is selected Views will pull in the comments of that node, but it's still using Drupal core's handling of those comments. So couldn't we somehow just limit the Comment module? I realize that this isn't a Views issue at this point, but just trying to figure out a solution.
Comment #5
scalp CreditAttribution: scalp commentedHere's what I came up with:
This will allow you to select 1 or 10 from the drop down in the content type edit page to determine how many comments should show on a page. As long as you're not showing comments using the default comment display elsewhere this will only show 1 or 10 comments under each node in a view if you're using row style "node". I use Views and Panels to display comments elsewhere so this works for me.