By jtrost on
I have defined a view to display nodes. However, the comment box does not appear in this view. How do I add a comment box with comments to the bottom of a view?
I have defined a view to display nodes. However, the comment box does not appear in this view. How do I add a comment box with comments to the bottom of a view?
Comments
Same question...
I was just about to post the same question. My view displays nodes also, and my users rate each node. I would like them to be able to comment on them as well.
I did some research on this and found that the problem (I believe) is that views uses arguments in the URL and comments also need to use arguments in the URL. Somehow there is a conflict.
Some reference:
http://drupal.org/node/754906#comment-2777780
You could just create normal
You could just create normal pages, and use the views_attach module to add a view to a node as content, and then people just comment the page, and thus, the view. You can leave the body-field empty and just fill in a title, nobody will know the difference(haven't tested this myself yet but this should work).
http://drupal.org/project/views_attach
This works perfectly! Thanks.
This works perfectly! Thanks. You would think that this is so intuitive that it would be included as a default display for Views.
Node wouldn't change?
Interesting workaround. However, wouldn't each comment stay with the node that the view is attached to? For example, if I'm on "page 2" of the view, and I leave a comment about page 2, that comment would be part of the node that the view is attached to, right? Not page 2 of the view. So I could be on page 10 of the view and still see that comment. It would never go away.
Am I theorizing correctly?
_
yep, you're correct-- there's no way to comment on a particular page of a view. Again, views are not nodes and do not have comments. All this work around does is allow you comment on a node that contains a view. You're still not commenting on the view itself because views don't have comments. This is really using views in a way it's not meant to be used, but if it meets a need then by all means use it.
_
There's no conflict because of the url-- views are not nodes and therefore cannot have comments. Rakward describes a workaround that will give you similar behavior.
To add a comment box to the
To add a comment box to the bottom of a view in Drupal, you can follow these steps:
Enable Comments: Ensure that comments are enabled for the content type you are displaying in the view.
Add Comment Field: Go to the view's settings and add a field for comments. You can usually find this under the "Fields" section by adding the "Comment" field floridablue login
Configure the Comment Field: Adjust the settings for the comment field to display it as desired. You can customize the display format and ensure it appears at the bottom of the view.
Save and Test: Save the view and test it to make sure the comment box appears as expected.