One of the categories on my blog is now up to nearly 1,000 entries and it has become difficult to display them. Movable Type offers the ability to split up the category content by date (e.g., Category-Monthly archives), but that would still require me to publish all of the content statically. I could use dynamic publishing, but then I would lose the speed of a statically published page on the front-end.
Situations like these, and a long-standing pubilc request, is why we're now introducing a dynamic way to paginate your index and archive templates using MT-Search. With this solution, you're able to publish the first 10 or 20 (or whatever you'd like) entries statically and paginate through the remainder dynamically. What's even better is that it only requires a few changes to your index or archive template to generate the content for MT-Search.
Getting Pagination on Your Blog
We've put together a guide to paginating with static templates that provides details on the new querystring parameters and sample template code. It's based on the classic template set included in MTOS, but could certainly be used as an example for other template sets. If you see any issues or improvements we can make, please leave comments here or on that page!
In addition to allowing for entry pagination, you can now limit your searches by author, category or date. For example, if I was going to search my blog for 'sneaker', the URL would look like this:
If I wanted it to limit it to only entries in 2007, I'd use this:
If I only wanted to look in the category 'Design', which has an ID of 40, I'd use this:
And if I wanted to limit to an author with the ID of 2, I'd use this:
The one caveat here is that, unlike entry pagination, you'll need to use the search template for these. See the entry pagination guide for more details.