Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
show the number of comments and "Write a comment" when the number is 0
How do I show the number of comments and how do I show “Write a comment” if the number is 0. Both linked to the comment form…
Thx,
M
Offline
Re: show the number of comments and "Write a comment" when the number is 0
Comment count can be controlled by either <a href=“http://textpattern.net/wiki/index.php?title=Txp:comments_count_/”>txp:comments_count /</a> or <a href=“http://textpattern.net/wiki/index.php?title=Txp:comments_invite_/”>txp:comments_invite /<a> (the latter with the showcount=“1” attribute).
The text for the <code><txp:comment_invite /></code> link will be taken from the article’s comment invitation field or the default invitation (set in admin —-> preferences), in that order. So far as I know, there is no way to conditionally set a different invitation if there are no comments for an individual entry. Maybe there’s a plugin….
Last edited by Elenita (2005-12-18 02:31:50)
Offline
#3 2005-12-19 06:11:30
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: show the number of comments and "Write a comment" when the number is 0
<txp:if_comments>
There are comments!
<txp:else />
There are no comments!
</txp:if_comments>
Offline
Re: show the number of comments and "Write a comment" when the number is 0
Oh, duh. So simple I thought it couldn’t be done.
Offline