comments
The comments tag is a single tag which is used to display the comments associated with a particular article. Comments will be displayed for the present individual article as a default, or to the article set by the “id” attribute.
Related: if_comments, if_comments_allowed, if_comments_disallowed
attributes
sort="posted asc"
form="comments"
wraptag="ol or unset"
break="li or div"
class="comments"
breakclass="unset"
offset="0" (integer)
limit="0" (integer)
Display comments, and give an indication of Comments status
Comments for articles can be turned off or on at the author’s discretion for any article that is published; by using the following scheme in an article form, you can still have the on/off control over comments while still giving users indication of comment status.
<txp:comments />
<txp:if_comments_allowed>
<txp:comments_form />
<txp:else />
<p>Comments are turned off for this article.</p>
</txp:if_comments_allowed>
Other tags used: comments_form, if_comments_allowed, else
Conditional comments
Tags
<txp:if_comments_allowed>
<txp:comments form="lineitem" breakclass="special" break="li" wraptag="ul" />
<txp:comments_form />
</txp:if_comments_allowed>
Form (lineitem) (type: comment)
<small><txp:comment_id /></small>
Styles could go this way
.special
{
display:list-item;
list-style-type:none;
}
What it does…
For the article, list id numbers and a comment input form; but only if comments are currently allowed.
Other tags used: comment_id, comments_form, if_comments_allowed