Alexei's Weblog

April 9, 2003

MTIndexEntries: Making Movable Type indices a little more reasonable

Alexei Kosut @ 1:14 pm

One thing about the default Movable Type setup that doesn’t work very well is the way that the index ("main") page picks entries to display. Specifically, it shows all the entries created in the last 7 days. This is fine if you write at least a few times a week, but what if you lapse for a while? Look what’s happened to Eric! You can set MT to always show the last N entries (e.g., I had mine set to 5 for a while), but that’s no good if you are very verbose occasionally, and want entries to stick around for a few days before they drop off the main page.

I couldn’t figure out a way to solve this with the standard MovableType built-in tags, so I wrote my own. MTIndexEntries is a plugin that lets you show both the last week’s entries and the last 5 entries (only showing each entry once, of course, and in the proper order):

<MTIndexEntries days="7" lastn="5">
&lt!-- your entry tags -->
&lt/MTIndexEntries>

I don’t feel like writing any documentation today, so all I’ve got is the plugin and the example above. But please feel free to give it a try.

8 Comments »

  1. MTIndexEntries akosut@cs.stanford.edu

    Trackback by MT Mini-Plugin Directory — April 13, 2003 @ 7:33 pm

  2. Superb!

    Now, what I really want is a hack to allow commenters a choice of MT text-filters to apply to their comments.

    Comment by Jacques Distler — April 14, 2003 @ 1:19 am

  3. This is great! It almost does one thing I’ve been looking for – I’d like to be able to offset days as well. Does it accept an ‘offset’ variable?

    Comment by Khoi Vinh — April 16, 2003 @ 10:43 pm

  4. New weblog Well, I decided to stick a weblog on this domain, just for something to do. I have no plans to abandon LiveJournal, though. But it would be nice to possibly have al alternate place to post about stuff. I’m going to be using MoveableType here as well, j…

    Trackback by chris.gushue.net — April 17, 2003 @ 7:18 pm

  5. Useful MT Plug-ins MTMacros, MTIfEmpty, Validable, MTIndexEntries

    Trackback by Bryce Yehl — June 1, 2003 @ 3:52 pm

  6. MT customizing (1) MT의 인덱스는 최근 날짜 7일 이내의 엔트리를 보여주게 되어있다. 7일 이내에 새로운 포스트가 없는 경우, 메인 인덱스 페이지가 텅~ 비게 나오게 된다. 이를 해결한 플럭인. 7일이내, 7개까지 …

    Trackback by YODA — October 6, 2003 @ 5:05 pm

  7. That one is no doubt a valueable MT link.

    Comment by Penny Stock — February 28, 2008 @ 2:59 am

  8. I am agree with your first line, there is always a problem in the main index page.

    Comment by earn money online — March 2, 2008 @ 7:06 pm

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

(required)

(required)


Note: Your comment is subject to moderation. If it does not appear immediately, it has been added to the moderation queue to be approved for posting.

Powered by WordPress