How to include the comment page number in views "rewrite results"? I built a custom "new comments" notification system that doesn't rely on the history module (and the super slow queries when viewing nodes with new comments).

When I show nodes with new comments I need to rewrite the link to jump to the first new comment. "node/[nid]#new" does that. However, when I have a lot of comments and the first new comment is on the 2nd page (or higher) the link doesn't work. It would need to be "node/[nid]?page=1#new", etc.

I don't think the "page" value is available in views. Any tricks I can use?
I used a "Global PHP" field and added this code:

&lt;?php 
$new = $row-&gt;comment_count - $row-&gt;nc_count;
$page = floor($new / 50);
$link =  '&lt;a href=node/' . $row-&gt;nid;
if ($page &gt; 0){
  $link = $link . '?page=' . $page;
}
$link = $link . '#new&gt;' . $row-&gt;nc_count . ' new&lt;/a&gt;' ;
print $link;
?&gt;


I don't like to use PHP in a view since it prevents caching. This view won't be cached, so it's not a problem this time. The other issue is that it doesn't generate the "pathauto" urls and requires an additional 301 redirect. I tried to use a "node link" variable but they don't seem to get changed to a pathauto link before the PHP field runs.

Any idea how I can render the /node/123 link to a pathauto link?