nosuch.org

Mistakes were made

New York City meets Munich

Alternative uses of Blogger

January 7th, 2005 · No Comments · Internet

I’ve volunteered to help out some people in getting their small, but professional web sites in place. One goal in both was ease of maintenance and updates by the site owners, in spite of a lack of experience or understanding of web publishing.

Since I was under some time pressure, mostly having to do with inordinate amounts of procrastination on my part, I resorted to a cheap hack. After designing a master template for the site with PHP and CSS, I used Blogger as a poor person’s content management system for the actual content.

In essence, I created a minimal template with Blogger which only shows the post text. No titles, no dates, no other HTML. Then I turned on archiving by individual post.

For each of the pages of the site, I used the title of the post to identify it. I also made all the posts on the same date, such as 01/01/2005. This means blogger creates several .html files in the /archive/2005/01/ directory. Hypothetically, let’s say I have a “home”, “bio”, “news” and “contact” posts, which will corrospond to the four pages of the site.

Since I want cruftless URLs, I created directories on the site for each of the pages, so the root directory is the home page and then there’s a /bio, /news and /contact directories for the other pages. In each of the directories is a config.php file, which sets a variable $page to the appropriate value: “home”, “bio”, “news” or “contact”.

In each directory goes a copy of the same index.php file, which now loads in the template.php file from a fixed place (I set up an /includes directory, but the location doesn’t matter), and the local config.php file. Using the value in the $page variable, the appropriate html fragment file in /archive/2005/01 is loaded into the template in the right spot and displayed.

The end result is a web site that a non-technical owner can update the text on using a nice, web based editor, and I can spend more time playing Xbox Live.

No Comments so far ↓

Like gas stations in rural Texas after 10 pm, comments are closed.