Help - Search - Members - Calendar
Full Version: Top Entries For A Category...
Movable Type Community Forum > Using Movable Type > Categories and Entry Tags
cristhompson
I'm sure this is a really basic question, but I have inherited a Movable Type website, and I am trying to make some changes quickly...

There was one database of entries which I have now seperated into different categories.

I want to display the top 3 entries on each category on the homepage, but I am using <MTEntries lastn="3"> and this only shows me the top 3 entries, not the top 3 for the category...

How do I selct a category as this stage?

Thanks...

cris.
danwolfgang
You can select a category by using the category filter of Entries. I suspect this is not what you want, though, because you'd need to create a separate Entries loop for each category.

Try using the Categories loop. Once you're in there you can enter the Entries context and get the entries in that category. Something like the following should do it:
CODE
<MTCategories>
<h3><$MTCategoryLabel$></h3>
    <MTEntries lastn="3">
    <p><a href="<MTEntryPermalink>"><MTEntryTitle></a></p>
    </MTEntries>
</MTCategories>
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.