Comments invite

On this page:


<txp:comments_invite />

The comments_invite tag is a single tag which is used to display a link to an article comment form. Text used for the link will be taken from the invitation field on the Textpattern Write administration panel.

This tag can be used in both Textpattern Page templates and Form templates.


Tag will accept the following attributes (case-sensitive):

Whether to display invite on individual article page.
Values: 0 (no) or 1 (yes).
Default: 0.
Whether to display comment count.
Values: 0 (no) or 1 (yes).
Default: 1.
Whether to display invite as text, rather than a hyperlink.
Values: 0 (no) or 1 (yes).
Default: 0.

Common presentational attributes

These attributes, which affect presentation, are shared by many tags. Note that default values can vary among tags.

class="class name"
HTML class to apply to the wraptag attribute value.
Default: comments_invite (see class cross-reference).
HTML tag to wrap around invite text, specified without brackets (e.g. wraptag="p").
Default: unset (but see wraptag cross-reference for exceptions).


Example 1: Display comments invitation and comment count

    <txp:comments_invite wraptag="p" />

This will display the comments invitation and a comment count (but only if there are any comments associated with the current article).

Other tags used: if_comments.

See something wrong in this document? Outdated info, a broken link, faulty code example, or whatever? Please write an issue and we’ll fix it.