Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
if_comments
Hi,
I have the following set up on my home page
<txp:recent_comments label="" break="" limit="5" form="home_recent_comments" />
and the form looks like this:
<div class="home-comments-comment">
<div class="home-comments-gravatar"><a href="<txp:comment_web />"><img src="/4.0/images/gravatar.png" /></a></div>
<p><strong><txp:comment_name /></strong> <span class="small"><txp:comment_time format="/ %b %d" /></span><br />
on <a href="<txp:permlink />" title=""><txp:title /></a></p>
</div>
I want to show a paragraph that says no comments if their are none, i tried added an if statement around the first part and it said i couldnt do that, i added it to the form and nothing happened, how do i do it thanks. x
~ Cameron
Offline
#2 2008-10-17 22:43:19
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: if_comments
As far as I know if_comments only works inside an article form (checks if an individual article has comments). You could try chh_if_data instead.
Offline
Re: if_comments
That plugin works fine :) wouldn’t a simple if data statement be a default thing in Txp though :S
~ Cameron
Offline
Pages: 1