Pagination with Movable Type

user-pic
| Comment

A client wanted the option to see more posts in the same style as the index page on their Movable Type blog - we show 15 posts on the home page, and they were looking for a link for more just like that - not an archives page, not a list of links to more posts - the same thing as the home page - but just more. There are several ways to do this - but I like quick, dirty, and cheap - so we went with this example posted on plasticmind.com:

...create six templates with eight entries on each and publish them to index1-5.html; be sure to offset the entries on the page in multiples of eight (offset="8"). At the bottom of each page is a hardcoded link to the previous page of entries. On the final page (in this example, index5.html) there's a link to the archive listing where people can discover more content. This is a decent compromise for most needs: you get all the benefits of static publishing, very little of the performance impact, while still allowing users to discover your content...

In the example above they are using 8 posts a page, but we went with 15, so the offsets are of course 15, 30, 45, etc. You can see it working here (we only have one page so far as the blog is newer).

The offset value goes in the MT Entries tag: <mt:Entries offset="15">


comments powered by Disqus  

Enter your email address:

Delivered by FeedBurner