Make nodecomment_render a theme function

tomchuk - May 29, 2008 - 15:24
Project:Node comments
Version:5.x-1.1
Component:Code
Category:feature request
Priority:minor
Assigned:Unassigned
Status:closed
Description

In trying to get the comment box above the comments view, it occurred to me that it would be great if nodecomment_render was theme_nodecomments and if the conditional declaration of comment_render called that instead. This way I could easily override the logic in nodecomment_render in a theme specific function, including the position of the comment box, the number of items in the view, etc.

Also, there may be cases (I'm working on one right now) where one would want to control the position of the comments in the theme layer (rather than directly below the node in node_show). Adding a config option to disable the declaration of comment_render would let me deal with the output of theme('nodecomments') directly in my templates.

Attached is a patch that accomplishes the above.

AttachmentSize
nodecomment.patch2.18 KB

#1

tomchuk - June 3, 2008 - 20:12
Priority:normal» minor
Status:active» closed

Nevermind, this doesn't actually work, something wonky with the pager.

 
 

Drupal is a registered trademark of Dries Buytaert.