I am getting all the comments listed in the same page. How can I do the paging concept for comments?
How do I get the comment count?

  • Why are you listing comments in a page? Can Comments In a View help you to use the power of views to paginate, filter, sort comments? – Shoaib Nawaz Jun 17 '11 at 14:53

Paging on comments is provided in Drupal Core without any contribute modules.

If you go to your content type configuration screen:

  • D6 Path: admin/content/node-type/[node-type-name]
  • D7 Path: admin/structure/types/manage/[node-type-name]

You will see there's a Comment field-set/tab(d7) with some options. The option you want to check out is the comments per page setting. Select the number you'll like for when a page should break and save your settings. Once you're comment have pass that threshold you will see a pager for your comments.

Now for the comment counts there a variable available to you in both Drupal 6 and 7 in the node template. The name of that variable is $comment_count.

| improve this answer | |
  • Thank you very much eric... Got exactly what i need.... :-) +1 for d6 and d7 – Fero Jun 18 '11 at 5:32

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.