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!
Published at 12:52 am on February 21st, 2003.
Topics: Personal Publishing
One Comment
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”; }
Comment by Phil at 12:59 pm on March 17th, 2003 #link