Subtle shift

27 November 2004

Always rearranging the furniture, me.

What you can see is both a shift in design and tweaking of what was there already. Breaking it down in to two parts: the tweaking was making the site valid XHTML 1.0 transitional, which it should be now. The design shift was moving the shortlinks out from the sidebar, where no-one saw them and they were much deprecated, and interleaving them with the main blog (much like Jason Kottke or Tom Coates have done.

It adds a little more activity to the page, and keeps the content varied. It also leads on to my next plan, which is integrating my delicious links into this site (as incentive to use delicious more). With any luck, they’ll be impercetibly different from MovableType-made link posts.

As for the way this is done: it wasn’t hugely clear looking around the net and took me a while to work out. I use one category in MT for posts and another for links. To interleave them, you set the category of your frontpage MTEntries section to “main or sub“. That puts them both in one, and keeps them in date order. Then, you wrap the MTEntries definition in a div, of which the class is (in appropriate pointy brackets) MTEntryCategory. Thus a main post is styled with the main class, and a sub post is styled with a sub class.

Finally, all that remains (and here the Firefox Web Developer toolbar helps) is to restyle the sub-classes of .sub as appropriate; display:none; will just stop a div classed as such even appearing; visibility:hidden; will hide it from view, but the space it occupies will remain. You can view the source and my stylesheet to work out what’s really going on

As long as you’ve suitably crafted the blog tempalte, it’s not hard at all to do. Just a case of careful styling, and then experimenting with the CSS. I’m definitely no expert in this, but I at least thought documenting it would help the next time anyone else gets stuck on this particular problem. When I incorporate del.icio.us, I’ll document that too.