Help - Search - Members - Calendar
Full Version: Excluding an entry
Movable Type Community Forum > Additional Resources > Tips and Tricks
Claudius
Here's the situation:

I have two "recent comments" lists on my index.

The first list is recent comments from all entries.

The second list is recent comments from a particular entry, using the mt-entry id tag, for the sake of this post lets call it entry "15".

How do I exclude the comments from entry "15" from appearing in the first recent comments list?
markpasc
I suggest the MTCompare plugin.
Claudius
I went ahead and got the mtcompare plugin. I'm still uncertain as to how to write the code. I tried this, although it didn't work (and probably for obvious reasons to someone more adept at code.)

CODE
<div class="side">
<MTIfNotEqual a="[MTEntry]" b="[MTEntry id='15']">
<MTComments lastn="5" sort_order="descend">
• <MTCommentAuthorLink spam_protect="1">: <MTCommentBody convert_breaks="0" trim_to="100" remove_html="1">
<MTCommentEntry>...
[<a href="<MTEntryLink archive_type="Individual">">entry</a>]
</MTCommentEntry><br />
</MTComments>
</MTIfNotEqual>
</div>


Any suggestions? Sorry I'm so misguided.
girlie
Try MTEntryID not MTEntry:

CODE
<MTIfNotEqual a="[MTEntryID]" b="15" numeric="1">
Claudius
Thanks for responding Girlie:

I used your line instead, and when I rebuilt I got this message:

MT::App::CMS=HASH(0x8066420) Use of uninitialized value in numeric eq (==) at plugins/Compare.pl line 38.


It still rebuilt, but it didn't exclude the comments from entry "15".
girlie
Maybe try it without numeric="1"?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.