Warning: serious programmer nerdism ahead.
I’ve been talking with Dave about how to publish to a Movable Type weblog from Radio‘s outliner.
Dave wrote up a nifty tool that lets you publish one post at a time. Which was great. But I wanted page-oriented editing, where you can edit several posts from a single outline.
We figured out that there are two ways to do it. The first way is to map each of the root level items in the outline to a weblog post. The second way is to map an entire day’s worth of entries to a weblog post. The second approach is nice and simple when it comes to saving to the server, but can get complicated when you want to generate an RSS feed or perform other item-oriented actions. The first way lets you program a little more efficiently, because you do caching and only post back entries that have changed. And you can even make your daily entries editable on several computers by posting the day’s outline to your Radio weblog.
The tricky part: what if you don’t want titles? In the current implementation, Movable Type’s metaWeblog.newPost will concoct titles for you if you leave them blank. The GUI, on the other hand, is happy to let you leave the title blank. Why not allow empty titles in the XML-RPC interface as well?
Anyway, I tracked down the relevant code. The culprit is line 131 of XMLRPCServer.pm.
$entry->title($item->{title} || first_n_words($item->{description}, 5));
Grumble.
I suppose I could edit this, but then I’d be running a hacked version, which I’d rather avoid.
A potential alternative is to code Radio to send a special title like “RADIONOTITLE”, and program my MT templates—all of them—to ignore titles equal to that magic string. Ponderous.
Maybe I am missing something obvious, but can’t you configure your MT template not to use the entry title at all?
LikeLike
Hi Srijith. Yes, you’re missing the fact that sometimes I want a title and other times I don’t. I guess this raises another possibility, though, which is to treat all incoming data from Radio as semantically title-less, and when I have titles, program Radio to display them prominently in the markup. This is similar in a way to what Instapundit does, though he probably doesn’t write his posts in Radio.
LikeLike
Ahh.. In that case I guess the method you mentioned (program Radio to display them prominently int the markup, but keep the template title-less) looks the simplest, if you dont want to live with a hacked MT.
LikeLike
Not knowing anything about how Radio or MT is working here, but couldn’t you use the empty string for a title?
LikeLike