Allow to output comments in a block
sun - October 26, 2008 - 16:20
| Project: | Comment Display |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | sun |
| Status: | reviewed & tested by the community |
Description
Title says it all. Thanks to chx's pointer, this makes use of another cool feature of the new menu system: menu_get_object().
Attached patch does the ground-work. However, it's likely that users will use the same variable name for the block region in their page template, i.e. $comments, which would lead to a situation where the page variable overrides the region variable.
| Attachment | Size |
|---|---|
| comment_display.block_.patch | 1.91 KB |

#1
Now prevents overriding a 'comments' region if that already exists.
#2
very handy module, thanks.
#3
I'm unsure whether I'm satisfied with this approach. Having comments in a block is definitely a benefit, but this leads to having a block title and the title for adding a new comment on different levels. Ideally, both the comments and the new comment form should be separate blocks - or - the output of comment_render() is altered in a way that the list of comments uses identical markup to output a "Comments" title above all comments, so a themer can style "Comments" and "Add new comment" accordingly.
#4
Here we go. This patch introduces a separate "Comment form" block that can be placed below the "Comments" block. Of course, this makes only sense when the comment form is configured to be displayed on a "separate page" - otherwise, the form is displayed twice on the node view.
Anyone available for testing?
#5
Thanks for this feature. I'm using it with Ajax Comments + Quicktabs and everything is working ok :)