Webmastersite.net
Register Log In

Conditional on Comment page

Comments on Conditional on Comment page

morton82
Forum Regular

Usergroup: Customer
Joined: Jan 21, 2005

Total Topics: 32
Total Comments: 102
Posted Jun 05, 2005 - 6:20 PM:

Hi,

How do i make a conditional such as if there is no comment posted, there will be a message displayed like

<IF {TOTALCOMMENTS} < 1>
There are no comments at the moment. Be the first to post one!
</IF>
Anyone knows the conditional for this?
mrowton
Forum Regular

Usergroup: Customer
Joined: Feb 19, 2004
Location: Michigan

Total Topics: 57
Total Comments: 185
mrowton
Posted Jun 05, 2005 - 7:35 PM:

That was pretty close, but you should have one < and > per line.
I'm not sure if totalcomments is a field, but if it were it would probably be the total number of comments in your directory, not just the link in question.

Try this

<IF {LINKNUMCOMMENTS} is 0>
There are no comments at the moment. Be the first to post one!
</IF>

or even

<IF {LINKNUMCOMMENTS} is 0>
There are no comments at the moment. Be the first to post one!
<OTHERWISE>
Join the discussion, post a comment!
</IF>

Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jun 06, 2005 - 8:14 AM:

Please read scripts.webmastersite.net/w...onditionals_Syntax-69.html for syntax, and check what's already in the templates for template variables to use (along with the ones listed in the manual).
morton82
Forum Regular

Usergroup: Customer
Joined: Jan 21, 2005

Total Topics: 32
Total Comments: 102
Posted Jun 06, 2005 - 3:09 PM:

Have tried {TOTAlNUMCOMMENTS} and {TOTAlCOMMENT} OR {TOTALCOMMENTS} but still not working, any help?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jun 09, 2005 - 7:40 AM:

It would help to know why you're trying those, where you came up with them from, if you've read the manual entry on link template variables, and if you've read mrowton's post.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.