I’m doing the following to load and render a node via ajax:
$node = node_load($id);
$node_view = node_view($node);
drupal_render($node_view);
This works perfectly for displaying the node, BUT the comments and comment form are missing. How would I add the comments and comment form to either $node or $node_view so they are rendered by drupal_render? node.tpl.php is being called to render the node FYI 😉
Thanks!!!
Looking at the comment module (specifically
comment_node_view()) it should be added by default but if not this should work: