Neil Turner's Blog

Blogging about technology and randomness since 2002

Recent Entries improvement

You may have noticed that on older archive pages, the Recent Entries section on the sidebar shows older entries than those on the front page. This is because the entry list is bound to the page whenever it is published – basically whenever it is created, rebuilt or has a comment/trackback ping attached to it. And since every page isn’t rebuilt every time I post a new entry, the lists tend to get outdated easily.
So, enter a solution: PHP. In MT, I created a new index template, which contains the code for the recent entries, and saved this as a file. The file is then attached using the PHP ‘include’ command. That way, the pages should all use the file, which is republished every time the indexes are rebuilt, including when I post a new entry.
Since hits to the individual archive pages make up a considerable proportion of hits here, I decided that I needed to get visitors moving around a bit, hence this update.
If you have MT, you may like to do this on your own server – if you don’t have PHP you could always use Server Side Includes (SSI).

Comments are closed.