jules wanted a way to link directly to a comment using the Recent Comments tag, and this seemed to work just great:
<a href=”{permalink=”weblog/comments”}#{comment_id}”>link to comment</a>
The addition is the #{comment_id}. Because EE auto puts in an anchor tag using the comment_id, this makes it easier to link directly to that certain comment.
How does this post make you feel?
- Excited
- Fascinated
- Amused
- Bored
- Sad
- Angry
This works great, but I’m using pagination for comments, and for me the links don’t work if the comment in question isn’t on the first page. :-(
now how about adding a target to the author link?
For some reason I am not getting comment_id’s by default, do I need to add <a name="{comment_id}"> to my comment page?
No, you shouldn’t have to do that. it’s built into the comments tag. Although I do see plenty of anchors in your page.
I had to manually add them.
hmm looking at that page, it looks like you have 2 sets of anchors per entry. One set numbers from 0 to x and the other one looks right, with something like 7xxx as the id’s. Just kind of odd that you had to add them in yourself.
The 0-X numbers were the one that ExpressionEngine added itself.
I just noted that Etan. : ) Looks like Rick missed something in his last update to the comments.