Posts Tagged ‘dbms’

MT As a DBMS

Tuesday, April 5th, 2005 at 7:25 pm

I don’t know what the hell I was thinking - that totally works. For some reason, I kept thinking that MT template tags wouldn’t work in a PHP file because they wouldn’t get updated. I created two categories just for the side bar: Recently Viewed and Reading. Then I made a new index template that contains everything in the side bar - since index templates are rebuilt when a new post is made (as far as I know, anyway), my side bar file is updated. The CatEntries plugin allows me to filter what categories are displayed. In the side bar, the last 5 posts from Recently Viewed are shown, and the most recent post from Reading. The index page excludes these two categories, but they still appear in monthly, daily, and category archives. It’s a neat way to use MT as a database management system.

Originally, I wanted to avoid a PHP include; I was so hell-bent on performance that I wanted to eliminate any PHP and make all pages static (because, you know, thousands of people are checking to see what I write EACH AND EVERY DAY). Realistically, a single file include isn’t going to affect performance in the slightest. I may add a couple while(1) loops just to be sure, though.