i'm using node_view to print nodes in a custom page. But the problem is that i need also the comments and the form comment to be shown under the node view.

How can i achieve this?


You probably need to use the node_show() function instead; it outputs the node as well as its accompany comment thread and comment form. node_show() relies on node_view() to print the node itself, but also calls comment module's code to build the rest.

One good rule of thumb for tracking down these scenarios is to visit the api.drupal.org site, look up the function that you're using to output a portion of the information you need, and look at the functions that also call it in Drupal core.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.