Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » Txp:else issue.

#1 2005-12-07 14:24:52

Nichod
Member
Registered: 2005-06-06
Posts: 119

Txp:else issue.

I have the following code place in an article alongside the title:

<code>
<txp:if_comments>
<p><txp:comments_count> Comments</p>
<txp:else />
<p><txp:image id=“1”/> Comments</p>
</txp:if_comments>
</code>

But for some reason. Even with a comment. It still is displaying the image.

Offline

#2 2005-12-07 14:37:49

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Txp:else issue.

You are using Textpattern version 4.0.2, right?

Offline

#3 2005-12-07 14:41:50

Nichod
Member
Registered: 2005-06-06
Posts: 119

Re: Txp:else issue.

Yes. I am.

Offline

#4 2005-12-07 14:59:08

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Txp:else issue.

Ok, so what happens if you do:

<txp:if_comments>
yep
<txp:else />
nope
</txp:if_comments>

Offline

#5 2005-12-07 15:04:19

Nichod
Member
Registered: 2005-06-06
Posts: 119

Re: Txp:else issue.

Hmm. That works. But if I put in <code><p><txp:comments_count> Comments</p></code> in place of the “yep” I get the # of comments. But nope will display.

Offline

#6 2005-12-07 15:07:20

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Txp:else issue.

Close the tag: <txp:comments_count />.

Offline

#7 2005-12-07 15:17:19

Nichod
Member
Registered: 2005-06-06
Posts: 119

Re: Txp:else issue.

Ahh. Didn’t see that. It was a direct copy and paste from the textpattern wiki.

Needs to be fixed guys: http://www.textpattern.net/wiki/index.php?title=Txp:if_comments

Thanks doggiez. Always something simple;)

Offline

#8 2005-12-07 15:20:27

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Txp:else issue.

Thanks. I’ll fix that right now.

Offline

  1. Index
  2. » Archives
  3. » Txp:else issue.

Board footer

Powered by FluxBB