<txp:recent_comments /> sing/cont tag, 3 attributes

recent_comments

The recent_comments tag is a single or a container tag. Textpattern will replace this tag with a list of permanent links to recent comments. This list will be displayed with the format

User’s Name (Article Name)

If used as a container, the tag must be specified as an opening and closing pair, like this:

<txp:recent_comments>
...contained statements...
</txp:recent_comments>

attributes

sort="posted asc" 
  • Values
    • discussid (comment ID#)
    • parentid (article ID#)
    • name
    • email
    • web
    • ip (IP address)
    • posted
    • message
    • rand() (random)
  • Direction
    • asc (ascending)
    • desc (descending)
limit="10" (integer) 
  • Number of comments to display.
offset="unset" (integer) 
  • Number of coments to skip.

presentation

label="unset" 
  • Label prepended to item (or as first list item, where appropriate).
  • if wraptag is available and is set to ol or ul, the label will be the first list item.
labeltag="unset" 
  • (X)HTML tag (without brackets) to wrap around label.
break="br" 
  • (X)HTML tag (without brackets) or string to separate list items.
wraptag="unset" 
  • (X)HTML tag (without brackets) to wrap around the list.
class="recent_comments" 
  • (X)HTML class attribute to apply to the wraptag.

genealogy

Version 4.0.7

  • Can be used as a container tag.
  • offset attribute added.
<txp:recent_comments /> 2 examples

Labeled list of recent comments

<txp:recent_comments label="Recent Comments" limit="25" wraptag="p" break="br" />

Recent comments as an unordered list

<txp:recent_comments label="Recent Comments" wraptag="ul" break="li" /> 

Style for default class could go this way:

.recent_comments {
     list-style-type:none;
}