Nodecomments seem to be processed in the $node variable very much like Drupal's core comments. This can make it challenging when theming. Drupal's Core Comments can be printed independently in a theme with the Comment Display module. Is there a separate $comments variable or equivalent that I can use to print just the nodes comments in my theme?

Or can I use 'drupal_get_form'? (I just want to print the comment form somewhere special in my theme, not necessarily the comments themselves.)

Thanks.

Comments

maedi’s picture

Was able to print just nodecomments using code from here:

$new_commentnode = new stdClass();
$new_commentnode->type = 'comment';
module_load_include('inc', 'node', 'node.pages');
$output .= drupal_get_form('comment_node_form', $new_commentnode);
print $output;

Though a $comments variable would be easier.

crea’s picture

Status: Active » Closed (fixed)

D6 1.x branch is not supported anymore. Closing.