Neil Turner's Blog

Blogging about technology and randomness since 2002

Pagination Nation

Thanks to Chad Everett’s Pagination articles, the category archives are now paginated – you’ll notice ‘previous’ and ‘next’ links at the bottom now. It’s done using dynamic publishing and a bit of extra Smarty code.
One point that Chad didn’t make is that this won’t work if you have enabled caching, so you either need to disable it, or do what I did and only have it enabled for the other archives where pagination isn’t desired. I did this by way of a regular expression:

if (!preg_match('/entries/',$_SERVER['REQUEST_URI'])) {
$mt->caching = true;

That code is somewhat specific to my MT installation – replace ‘/entries/‘ with the path to the archives that are paginated. Or turn caching off altogether.
Now if you’ll excuse me I need to reboot again – Critical Updates has delivered its second not-particularly-critical update of the morning and keeps annoying me every 5 minutes because I haven’t rebooted yet. The updates are, incidentally, a release candidate (!!!) of Windows Installer 3.1 and support for WPA 2.

Comments are closed.