Part of the point of my CatEntries plugin was to actually give you N items if you said <MTCatEntries lastn="N" include="Cat,Mouse">, but I didn't do that. As Scott Andrew LePera points out, this is a real annoyance. Not that my plugin is broken, I mean--just that MT doesn't work that way. He also published a plugin that does exclude like my CatEntries plugin, but gets lastn wrong, also like my CatEntries plugin.
So here's MTCatEntries 2. It handles lastn properly. I guess I should call it beta, since it works for me (see always four Quick links and always four Threads links on my main weblog page for proof) but I didn't go out of my way to test it.
If you wonder, it does it the stupid (also known as "brute force") way, which is that if you specify lastn but it has to discard some entries to meet your category requirements, it does another fetch of the same number previous and adds those in. That means if your last N entries don't match your requirements, you're doing multiple entry fetches--but if you're bothering to use this, that's probably good enough. Bad performance is better than not being able to do what you want. (Well, I say this, but maybe Michal would disagree.)
Comments
comment
I have been trying MTCatEntries 2 with no luck. Basically, it errors on TrackBack and DateHeaders. I guess you don’t support those functions. Any pointers?