{"id":3834,"date":"2011-10-17T13:49:13","date_gmt":"2011-10-17T17:49:13","guid":{"rendered":"http:\/\/lia.bulaong.com\/wp\/?p=3834"},"modified":"2011-10-17T13:49:13","modified_gmt":"2011-10-17T17:49:13","slug":"movable_type_pagination_achievement_unlocked","status":"publish","type":"post","link":"https:\/\/lia.bulaong.com\/blog\/2011\/10\/movable_type_pagination_achievement_unlocked\/","title":{"rendered":"movable type pagination achievement unlocked"},"content":{"rendered":"<p>I mentioned in my <a href=\"http:\/\/lliiaa.com\/2011\/10\/16\/happy_10th_birthday_movable_type.php\">last post<\/a> that Movable Type doesn&#8217;t have pagination built in, which is only <em>slightly<\/em> untrue\u2014someone at Six Apart did actually put together a guide to <a href=\"http:\/\/www.movabletype.org\/documentation\/designer\/pagination-static.html\">enabling pagination<\/a> for version 4.3 onwards, except that a) it&#8217;s a pain in the ass to get working, and b) what it&#8217;s actually doing isn&#8217;t pagination-as-you-expect, but using search scripts to do the job. What? No. And again, it&#8217;s unacceptable that pagination doesn&#8217;t just work out of the box, since it&#8217;s a feature everyone now considers basic.<br \/>\nAnyway, I wanted pagination for my front page here and in my archives (which will be up at some point), so I spent a few minutes yesterday getting Alden Bates&#8217; <a href=\"http:\/\/www.aldenbates.com\/archives\/2010\/02\/21\/paged_archives_14.html\">Paged Archives 1.4<\/a> plugin working on my 5.1 install. The only thing I really had to do to get it work the way I wanted was have it spit out the page numbers\/links within &lt;li&gt;, so I could <a href=\"http:\/\/www.alistapart.com\/articles\/taminglists\/\">style them within an unordered list<\/a>. All I had to do for that was replace lines 230-231 of pagedarchives.pl with:<\/p>\n<pre><code>$pagelist.=$spacer.'&lt;li&gt;&lt;a href=\"'.$filename.'\"&gt;'.$pagetext.'&lt;\/a&gt;&lt;\/li&gt;' if($ii != $pagenum);\n$pagelist.=$spacer.'&lt;li class=\"pagination-current\"&gt;'.$pagetext.'&lt;\/li&gt;' if($ii == $pagenum);\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I mentioned in my last post that Movable Type doesn&#8217;t have pagination built in, which is only slightly untrue\u2014someone at Six Apart did actually put<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-3834","post","type-post","status-publish","format-standard","hentry","category-lliiaa"],"_links":{"self":[{"href":"https:\/\/lia.bulaong.com\/blog\/wp-json\/wp\/v2\/posts\/3834","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lia.bulaong.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lia.bulaong.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lia.bulaong.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lia.bulaong.com\/blog\/wp-json\/wp\/v2\/comments?post=3834"}],"version-history":[{"count":0,"href":"https:\/\/lia.bulaong.com\/blog\/wp-json\/wp\/v2\/posts\/3834\/revisions"}],"wp:attachment":[{"href":"https:\/\/lia.bulaong.com\/blog\/wp-json\/wp\/v2\/media?parent=3834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lia.bulaong.com\/blog\/wp-json\/wp\/v2\/categories?post=3834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lia.bulaong.com\/blog\/wp-json\/wp\/v2\/tags?post=3834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}