January 01, 2003
How'd he do that?
So you see all this fancy stuff here and wonder, how do I do that on my site?
Ok, go forth and steal. View source on my pages and see what your browser is doing to show your these pages. Then take a look into my templates directory. Unlike some folks I try to share the little secrets. Most sites don't publish their templates but I figure it's better to share.
Start with my main index template and work your way out from there. This is the first page most folks will see. Note that it uses a stylesheet. I've taken the basic one from movabletype and formatted it for my site. NOTE, I didn't not rename any of the classes. You can drop this CSS file into any regular movabletype site and it'll work. I have added a few new classes to help with some extra stuff. But the core stuff is there and if you want to share your stylesheets you'll want to avoid changing the core names.
Ok, from there you'll notice I make heavy use of the MTInclude tag. This lets me drag in pieces from other templates. Why? Because it's often easier to edit one small part of a template and have it usable in lots of different places. Programmer types refer to this as resuabilty. I also do this because it makes it easier to avoid getting confused. There is a downside to this, rebuilding pages can take longer. But it's not enough so you'd notice. But take care, if you make you own templates be sure you're not making horrible reload times. This is important when you start making pages that get updated externally, like comments. At some point, when your design stabilizes, you may want to go back and collapse a few pieces together to help speed things up.
One very quick template is the one for head of page metadata. This lets me stuff all those link and meta tags into one place. They're handy for search engine and other web crawler access to my site. But if I tried keeping track of them on all the different pages I'd go crazy. headmeta template to the rescue!
I'll touch on the other templates as things go along. Meanwhile, browse around and see if there's parts you can use. If you do, drop me a line as feedback's always nice.




