x
 
Create New Page

Revision: Comment Permalinks

Revision from: 13:05, 16 Dec 2007

Question:

How can I automatically create a permanent link to each comment?

Answer:

Method 1:

<a href="{permalink}" title="direct link to this comment">Permalink</a>

Method 2:

<a href="{url_title_path=weblog/comments}#comment{comment_id}">Comment
#1 by John ..... </a>

You would also need, of course, to set the anchor that you’re referencing:

<a name="comment{comment_id}"></a>

If you are using an XHTML 1.1 DOCTYPE declaration, make sure to use the “id” attribute instead of the “name” one.

Category:Comments Category:Tips

Categories: