Man, there’s nothing interesting going on in the world of the Internet today.
Here’s some news about kennsarah.net: I’ve discovered server-side includes. Since my webhost is running Apache, I can use the standard syntax for includes which looks something like this:
<!--#include virtual="../relative/path/to/file.shtml"-->
The question is, of course, what in the world is this good for? Well, in order to update different aspects of this site, I’ve been “versioning” different parts of my HTML code. You can see this if you view the source for the site: the banner has a version, the left column has a version, and so on. Once I’m happy with a tweak, I’ve been taking that bit of code and cutting and pasting it to the different templates across the website–a tedious procedure, at best.
With SSI‘s, I can create templates for each segment of my code (such as for the Banner, Left Column, and so on), which can be “snapped into” the Main Index, Archive, or any other templates. Any templates with the <!–#include–> tag need to be renamed to filename.shtml to indicate to the server that the file needs parsing before being served to the end-user.
John Bell had pointed out that MovableType also supports variable includes but, as with most MT solutions that I’ve seen, the code for the included templates is merged into the calling templates when rebuilding the site. That’s nice, but can (unnecessarily) cost some disk space on the server (although it is useful to point out that I’m wasting just as much space with the current monolithic setup I have now). Another issue is that there’s no way to call that bit of code from another blog on the site because MT includes are limited to the scope of one blog.
The result? My HTML code can be broken up into easily-managable pieces which can aid in maintaining current templates and quicken development of new ones. The cost is a tiny bit of server-side processing before the page is served. My résumé shows the result of a SSI to a bit of code that is generated by the main site blog. Boo-yah.
Note: this is not an original idea by any means. Mark’s been using SSI since April.
Update: I just finished this tonight–the whole site is now as modular as a Lego project.
i had neglected to mention that MT Template Modules would cost unnecessary disk space, as that was the first thing I thought of when I started to use it.
I use it personally for two reasons:
1. For some reason, I can’t get SSIs to work on my server, even with the proper syntax, and I’ve been too lazy to email support.
2. The company who hosts me tells me in FAQ’s they’ll get really upset with me if I SSI the amount of code I want to SSI.
3. I have WAAAAAY more disk space than I ever plan to use.
(400 MB!)
So yeah, the modules are good for me, but given everything else, SSI is the way to go.
Today I also plan to learn how to count.
3 bullet points does not equal 2 reasons. Hehe.
Oh dear… for a comp geek I thought this stuff was synonomos with basic HTML… C’mon Kenny! Use the force! SSI rules the left side of your page! It’s the beast of the east… it’s like Patrick Ewing of the early 90′s…
LOL! Jai, I have no idea what I was thinking. Sorry man, I’ll try to make my next post extremely geek-ridden technical. ;-9 Seriously, it’ll be about something really nerdy. And edgy. Promise.
Ken, you wrote:
“Sorry man, I’ll try to make my next post extremely geek-ridden technical…”
From my standpoint (which is a humble one, of course), I would want to encourage you that I do not personally believe that your posts here could be any more geek-ridden. Don’t worry, Ken, you have met that goal….(rolling eyes!)
And, I want to know, when does your WIFE get her own corner here? There are those of us who like her a lot, and want to hear about something Sarah-ish…something horse-y….something funny. How about a corner for her?? You could call it “Sarah’s Secrets” or “Mrs. Walker’s Walk” or “Sarah Gail’s Bale”…..well, you get the idea.
BTW, I like you too, Ken. But, you know how much I like your (ahem…) better half…..
Speaking the truth in love, as always…
Jode’s Jen