As this blog has attracted more and more visitors each month, the number of comments I’ve been receiving has also been on the increase. Every now and then one of my threads generates some extremely interesting feedback, and it was starting to get annoying that I couldn’t reference these comments directly. What I really wanted was the ability to link directly to a comment.
A quick look through the Movable Type documentation, and I found details for the @MTCommentID@ tag. Simply put when placed inside an @MTComments@ tag (or in my case “@MTSimpleComments@(Plugin which will print comments and trackbacks in the same listing.)”:http://mt-plugins.org/archives/entry/simplecomments.php) it will print the ID for a comment. It is then a simple matter to create an HTML anchor for that specific comment like so:
" />
In of itself this isn’t terribly useful – I need to look at the source of the page to get the anchor name, and then have to create the link by hand. So I’ve also added a comment permalink, using the following code – again within the @MTComments@ tag:
#" title="Permalink to this comment">Permalink
So, when I next get an interesting post, I can link right to it, and so can anyone else.
_Updated_: I posted more on this subject in “Comment Permalinks revisited”:http://www.magpiebrain.com/archives/000223.html.