The comments tag is a Single Tag. Textpattern will replace this tag with 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.
The comments tag has the following syntactic structure…
<txp:comments />
Tag will accept the following attributes (case-sensitive):
The article you want to view comments for. Default is current article. Attribute works only on non-individual article pages.
How to sort the resulting list. Available values: discussid (comment ID#), parentid (article ID#), name, email, web, ip IP address, posted, message, rand() random. Default is posted asc.
Default is comments.
(X)HTML tag (without brackets) to wrap around list. Default depends upon Present Comments as a Numbered List? preference setting, either ol or unset.
(X)HTML tag (without brackets) or string used to separate comments. Default depends upon Present Comments as a Numbered List? preference setting, either li or div.
(X)HTML class attribute to be applied to wraptag. Default is comments.
(X)HTML class attribute to be applied to break (when value supplied is a tag). Default is unset.
Comments for articles can be turned off or on at the authors 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>
Tags
<txp:if_comments_allowed id="3"> <txp:comments id="3" form="lineitem" breakclass="special" break="li" wraptag="ul" /> <txp:comments_form id="3" /> </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; }
Other tags used: <comment_id />, <comments_form />, <if_comments_allowed>