CDB cat dog-egories:
      

January 12, 2004

Dog/Blog House Updates Part Trois

Another squirrely thing about MovableType right out of the box is that the category archive templates it create is more or less a never-ending appending of your posts to a long scrolling archive. It hardly seems useful once you have blogged say 10, 20 entries in a category, much less if you have written long pieces and/or embedded images.

Previously I wrote about my funky strategy for creating two sets of category archives, the recent 20 linked to "all the rest", but I have modified the output templates to produce more or less a title/abstract view (example) rather than a mimic of the original post, with a link to the full post (the individual archive, old example)...

This is pretty easy, it is a modification of your Category Archive template, and replacing the part between the <MTEntries>...</MTEntries> tags with something more like:


<MTEntries><$MTEntryTrackbackData$><p><a href="<$MTEntryPermalink$>"><strong><a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a></strong> (<$MTEntryDate format="%x"$>)<br /><$MTEntryBody words="50"$>... «<a href="<$MTEntryPermalink$>">more</a>»</p></MTEntries>

Being in the Category Archive template context, this pulls data from only one category at a time, so it loops through all the entries for a category named, say, "Foo". It first embeds the TrackBack data for that entry (hidden code, but useful).

Next it spits out the entry title, puts it in bold (<strong>.. </strong>tags), and hyperlinks the title to the individual; entry. This is followed by a readable date format for when the entry was posted. Then, it echos just the first 50 words from the entry. "..." with a redundant "more" link that again leads to the full entry.

There are more things one could do- I do not have the comment/trackback count added here ("left as an exercise for..." you know that song), but the result is a more compact listing of the entries for each category.

blogged January 12, 2004 08:38 PM :: category [ using mt ] :: TrackBack
Comments About "Dog/Blog House Updates Part Trois"
Spammers Have Force Our Hands...
spamroach.jpg
Note: Those nasty blog-spamming roaches have forced us to take action to prevent their spread- all entries made to this blog will remain open for comments for 30 days after the original posting date. After that, it is old news anyhow, correct?

If you really need to make contact with the chief dog around here, please submit a request via our feedback center