This permits a list of recent comments to link to the correct page, when comment pagination is being used.
{exp:comment:entries sort="desc" orderby="date" limit="10" dynamic="off"}
{url_or_email_as_author} on <i>
<?php
$PaginatorPage = "";
$query = mysql_query("SELECT comment_id FROM exp_comments WHERE entry_id = {entry_id}");
$comment_total = mysql_num_rows($query);
if ($comment_total > 200)
$PaginatorPage = "/P" . (floor($comment_total / 200) * 200);
?>
<a href="{comment_url_title_auto_path}<?= $PaginatorPage ?>#{comment_id}">{title}</a>
</i>.
<center>———</center>
{/exp:comment:entries}
I have PHP parsing stage set to “output” in the template preferences for this template. On the comments page, where the actual comments are displayed, I have:
{exp:comment:entries limit= "200" paginate="both"}
...matching the “200” in the recent comments list.
