I’m a EE-newbie an needed to figure out how to link to a recent comment entry (single entry w/anchor) from my default weblog index-site.
I searched throught the forum, wiki etc. and couldn’t really find a solution. Until I stumbled upon this entry in the comments user guide. It took a while for me, so I wanna share for anybody my solution especially if you’re a newbie.
here is now the code I use on my website and it works quite well:
From the weblog index:
<ul class="modulebox_content">
{exp:comment:entries orderby="date" sort="desc" limit="5" weblog="{my_weblog}" dynamic="off" disable="pagination|custom_fields|categories|member_data|trackbacks"}
<li class="liste">{name} zu - <a href="{title_permalink="{my_template_group}/comments/"}#{comment_id}">{title}</a></li>
{/exp:comment:entries}
</ul>
From the comments page (same weblog):
{exp:comment:entries weblog="{my_weblog}" limit="25"}
<div class="commentbox_content">
<h1><a href="{permalink="{my_template_group}/comments"}">{count}</a></h1>
{comment}
</div>
{/exp:comment:entries}
The variable {count} counts the entries only on the comments page. The permalink adds the anchor id to each comment. so you can jump straight to it from any weblog.
If someone has any suggestions, let me know.
Stefan
