Tim’s
Bandwagon

No Comment

I’d like to present my MT comments (all 1 or 2 of them) in an ordered list. This would have been easy with something like…

<ol>
<MTComments>
<li><$MTCommentBody$> […] and $MTCommentSoOn</li>
</MTComments>
</ol>

The list would only work if the comment-count is bigger than one. I’ve had a quick look at Brad Choates MTIfEmpty plugin [via Google and the girlie matters]. Trouble comes if there are no comments, the best I could come up with was this:

<ol>
<MTIfEmpty expr=”[MTComments]1[/MTComments]”>
<li>There are not any comments for this post yet.</li>
</MTIfEmpty>
<MTComments>
<li><$MTCommentBody$> […] and $MTCommentSoOn</li>
</MTComments>
</ol>

I think I’m missing something, there must be a better way?

Postscript: Fixed it, I was missing something — MTIfNotEmpty!

One Comment

  1. Yeah, this difficulty results in almost every Movable Type generated site having those two identical headers, “Comments”, “Post a comment” immediately above each other when there are no comments. I resorted to using PHP to output different headings and text when there were no comments. Something like:

    if (<\$MTEntryCommentCount$> > 0 ) { print “<h5>Comments</h5>\n”; }

Leave a Comment

Your personal information

Your comment