How to create a Drupal View that shows all articles nodes AND ONLY the most recent comment, if any comments are associated with

admin2025-04-26  5

I have what seems like a simple request (to me, anyway) but have not found a solution or discussion for this exact problem.

I have a View creating a table of all my article nodes. Each row is a node, and I have columns for the Article title, node ID, etc, and at the end want to have a column that shows the most recent comment for that Article node - IF it has a comment. This is what I want, using a View of Article nodes which seems to be the closest:

This is behind-the-scenes:

This is what I've tried:

  • When creating a list of Article nodes, I only seem to get the Comment body when creating a duplicate row for each Article (as the field warns you when choosing it)
  • Using Aggregation or Advanced Aggregation in an Article View on the Comment field, in order to reduce duplicates, also doesn't work when I select Maximum (or Minimum): the field freezes, doesn't load the page, and I have to delete it.
  • Creating a Comment View doesn't seem to work b/c it won't show the Articles that don't have a comment
  • seems like it would work by placing the Comment View inside a cell on the Article View, but I'm not able to get it working. Don't see any steps, but if I start reading through the Reported Issues perhaps I'll learn how to set it up.
  • I don't want to output the table with duplicate Article rows and then try to hide them, yuck.
  • Other thoughts?? Help!!
转载请注明原文地址:http://anycun.com/QandA/1745601265a91028.html