I was thinking about jazzing up my movie reviews website. I figured the easiest way to do this would be to add a stylesheet which could apply background colors, text styles, and snazzy layouts to the whole site easily. I went and looked for some sample stylesheets to see what I could do. I have worked with stylesheets on the blog and on the wiki and they get kind of complicated, so I just wanted something simple. But I would need to add some additional tags to the movie reviews to make it all work.
The way the movie review site works right now is all of the reviews are stored in a Microsoft Access database and then I can create all the pages of the website by pushing a couple of buttons in the database. Then I just need to upload the files to my server. This is different from how the blog and wiki work. They store the files in a database on the web server. You enter a blog entry or wiki article and it is stored in the online database. The blog and wiki use php code and SQL databases. It’s not insanely complicated, but I don’t want to have to write all of the php from scratch. So I wanted to stick to Microsoft Access.
The problem with Access is that every little snippet of code that goes into the web pages has to be written out in almost equation form and things like quote marks aren’t allowed, so you have to set up a variable for quote marks. It’s a lot of string functions to put the source code together correctly. But you only have to do it when you’re setting things up.
So I found a nice stylesheet for free on the web and it was pretty simple, similar to the blog with a header at the top, some content on the left, and a menu along the top and right. I wanted to customize it a little, so I started playing around with the stylesheet and the sample html file to customize it. I didn’t need the menus, for instance. I just wanted the clean look. And I changed a few colors and simplified the graphics. Also I like having the grade I give the movie as a big letter at the beginning, so I added that to the stylesheet. I was just playing around with the sample files, not trying to do this in the database yet.
But I thought it would be kind of neat to have the menus for navigation and they looked pretty good. I just didn’t want to put all that coding into the database and you can’t really generate text or links using a stylesheet. Then I thought maybe I could start with a template and insert the movie reviews into the template. Really, what you have to do is read text from a template file with HTML in it and write that to an output file, then insert the movie title and review into the output file, then read another template file wih more HTML, and write that to the output file. This actually simplified things a lot and meant I could make big changes to the look of the website just by messing around with the stylesheet and/or the template files. Then I would re-create all the web files and upload them.
One complication is that individual movie reviews are stored in subfolders for their year, but the archive lists are in the main folder. So when I have a link to another page, I had to add a ../ to the pages that are movie reviews so they would bump up a folder level before going to the correct year subfolder. This meant I needed separate templates for movie reviews (with bump ups) and for the indexes (without), but that’s not so bad either. It just means that when I want to make a change, I have to make that change to two different templates.
Anyway, I think it turned out pretty well so far: