Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
How to output something like "No comments yet. Write the first"?
hello forum,
sure, this question must have been answered somewhere but as the search terms are very generic i can’t find the solution. i would like to output a message in case there are no comments to an article so far.
this is my comments form:
<p class="small excommentmeta">Kommentar von <txp:comment_name />. <txp:comment_time /></p>
<txp:comment_message />
i tried this but it doesn’t work:
<txp:chh_if_data> <!-- check for comments data -->
<p class="small excommentmeta">Kommentar von <txp:comment_name />. <txp:comment_time /></p>
<txp:comment_message />
<txp:else /> <!-- no comments -->
<p>Bisher keine Kommentare zu dieser Ausstellung. Schreiben Sie den ersten!</p>
</txp:chh_if_data>
thanks for your help!
Offline
Re: How to output something like "No comments yet. Write the first"?
How about something like:
<txp:if_comments_allowed>
<txp:if_comments>
...stuff here...
<txp:else />
<p>No comments yet.</p>
</txp:if_comments>
</txp:if_comments_allowed>
I think that would work.
Last edited by philwareham (2012-04-30 16:31:26)
Offline
Re: How to output something like "No comments yet. Write the first"?
hi phil,
that does the trick, thanks.
Offline