Recent comments output
I use the recent_comments tag to output the 5 most recent comments on TXP Tips.
The tag works very nicely, especially since the release of Textpattern 4.07 which added container tag functionality.
Single tag usage
<txp:recent_comments break="li" limit="5" wraptag="ul" class="category_list" />
This is what I have been using until today on TXP Tips. Works fine, but outputs the comments like so:
User's Name (Article Name)
If you wish to change this format, you will need to use the tag as a container, then add your own formatting, like so:
<txp:recent_comments limit="5" break="" wraptag="ul" class="category_list">
<li><txp:comment_name link="0" />: <txp:comment_permlink><txp:title /></txp:comment_permlink></li>
</txp:recent_comments>
This is what TXP Tips has now on the sidebar. Note the break="" which is necessary otherwise Textpattern adds a <br /> tag, and the link="0" in the comment_name tag which removes the link.
5 Comments - Comments RSS Feed
Clive Walker
# 13 January 2010
Just found the Txp Tips website. Very useful (even though I’ve used Txp for a while!). Thanks for the tip on recent comments. Have it working on my blog.

Jonathan Stubbs
# 10 April 2009
A small edit to the above tip today – I had used
<txp:permlink><txp:title /></txp:permlink>instead of<txp:comment_permlink><txp:title /></txp:comment_permlink>.The problem with the former is that the comment #id is not outputted with
<txp:permlink />, so the user is taken to the article rather than the comment itself.<txp:comment_permlink />performs this function.