Breaking Drupal Comments into Multiple Pages

I've taken the 'bold' step of breaking pages with dozens of comments into multiple pages. With Drupal, this is easy because it's just a setting in the admin screens. However, there's a problem because the 'Recent Comments' block (down on the left hand side) doesn't link to the right page.

A look at drupal.org reveals a number of patches, but none of them particularly good, and none actually making it into Drupal development. I've just created a 'patch', in the form of a theme template. It uses the Drupal cache system to save a bit of database work, which coupled with the Drupal Block Cache should see pretty decent performance. The theme template is attached to this page. Download it, and stick it in your theme's directory (rename the file to comment-block.tpl.php).

AttachmentSize
comment-block.tpl_.php.txt3.6 KB
Post new comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.
  • Images can be added to this post.

More information about formatting options